On Tue, Nov 15, 2022 at 5:13 AM John Snow <js...@redhat.com> wrote: > > On Thu, Nov 10, 2022 at 11:22 PM Ani Sinha <a...@anisinha.ca> wrote: > > > > On Thu, Nov 10, 2022 at 11:37 PM John Snow <js...@redhat.com> wrote: > > > > > > Hiya, on today's origin/master > > > (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make > > > check-avocado" is failing on the new biosbits test on my local > > > development machine: > > > > > > (001/193) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: > > > FAIL: True is not false : The VM seems to have failed to shutdown in > > > time (83.65 s) > > > > > > Is this a known issue, or should I begin to investigate it? > > > > In my test environment it does pass. > > > > $ ./tests/venv/bin/avocado run -t acpi tests/avocado > > Fetching asset from > > tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits > > JOB ID : 35726df7d3c2e0f41847822620c78195ba45b9b9 > > JOB LOG : > > /home/anisinha/avocado/job-results/job-2022-11-11T09.42-35726df/job.log > > (1/1) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: > > PASS (57.57 s) > > RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 > > | CANCEL 0 > > JOB TIME : 63.82 s > > > > However, I have seen that on certain slower test machines or when run > > within a virtual machine, the test can take longer to complete and 60 > > secs may not always be enough. In those cases raising the maximum > > completion time to 90 secs helps. Perhaps you can try this and let me > > know if it helps: > > Hmm - I'm running on a fairly modern machine and not in a VM. Do you > have an invocation to share that exists outside of the avocado > machinery
If you pass V=1 in the environment then it dumps the QEMU command line that was used to run the test. You also need to comment out the line > shutil.rmtree(self._workDir) in tearDown() so that the iso is not cleaned up. diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py index a67d30d583..2060e3b84f 100644 --- a/tests/avocado/acpi-bits.py +++ b/tests/avocado/acpi-bits.py @@ -357,7 +357,7 @@ def tearDown(self): if self._vm: self.assertFalse(not self._vm.is_running) self.logger.info('removing the work directory %s', self._workDir) - shutil.rmtree(self._workDir) + # shutil.rmtree(self._workDir) super().tearDown() def test_acpi_smbios_bits(self): while you are at it, it might makes sense to check the vnc for the VM to see what it is doing. where I could test this individually and see how long it > might take to complete if I just let it run? I am worried that it's > getting wedged instead of just taking a long time, but it's hard to > tell. > > --js > > > > > diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py > > index 8745a58a76..b11fe39350 100644 > > --- a/tests/avocado/acpi-bits.py > > +++ b/tests/avocado/acpi-bits.py > > @@ -385,8 +385,9 @@ def test_acpi_smbios_bits(self): > > self._vm.launch() > > # biosbits has been configured to run all the specified test suites > > # in batch mode and then automatically initiate a vm shutdown. > > - # sleep for maximum of one minute > > - max_sleep_time = time.monotonic() + 60 > > + # sleep for a maximum of one and half minutes to accommodate > > running this > > + # even on slower machines. > > + max_sleep_time = time.monotonic() + 90 > > while self._vm.is_running() and time.monotonic() < max_sleep_time: > > time.sleep(1) > > >