Martin Polednik has uploaded a new change for review. Change subject: tests: fix possible test failure due to reboot event ......................................................................
tests: fix possible test failure due to reboot event Virt tests currently have a chance of failing even on successful run if qemu bios startup takes a bit longer than ussual. This leads to halting the VM right before initramfs services start, causing "reboot event" (leading to state "RebootInProgress") causing test for upstates to fail. This patch changes the default wait time to 30 seconds (through constant VM_MINIMAL_UPTIME), giving the test run enough time to finish currectly. In future, we would like to get rid of this time by adding a heartbeat module to initramfs that would indicate successful boot, allowing for faster test runs. Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498 Signed-off-by: Martin Polednik <[email protected]> --- M tests/functional/virtTests.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/23037/1 diff --git a/tests/functional/virtTests.py b/tests/functional/virtTests.py index bd54621..94f9c74 100644 --- a/tests/functional/virtTests.py +++ b/tests/functional/virtTests.py @@ -49,6 +49,8 @@ ] _tmpinitramfs = False +VM_MINIMAL_UPTIME = 30 + def setUpModule(): # global used in order to keep the iniramfs image persistent across @@ -185,7 +187,7 @@ 'vmName': 'testSimpleVm'} with RunningVm(self.vdsm, customization) as vm: - self._waitForStartup(vm, 10) + self._waitForStartup(vm, VM_MINIMAL_UPTIME) @requireKVM @permutations([['localfs'], ['iscsi'], ['nfs']]) @@ -201,7 +203,7 @@ with RollbackContext() as rollback: disk.createVdsmStorageLayout(conf, 3, rollback) with RunningVm(self.vdsm, customization) as vm: - self._waitForStartup(vm, 10) + self._waitForStartup(vm, VM_MINIMAL_UPTIME) @requireKVM @permutations([['hotplugNic'], ['virtioNic'], ['smartcard'], @@ -258,7 +260,7 @@ customization['devices'].append(deviceDef[device]) with RunningVm(self.vdsm, customization) as vm: - self._waitForStartup(vm, 10) + self._waitForStartup(vm, VM_MINIMAL_UPTIME) if 'hotplugNic' in devices: self.retryAssert(partial(self.vdsm.hotplugNic, -- To view, visit http://gerrit.ovirt.org/23037 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
