If you run this single avocado test:

while ./build/x86/tests/venv/bin/avocado run
build/x86/tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd
; do true; done

then on my machine it will fail within 4 or 5 iterations. Has anybody
looked into this? Looking at a log from a failed test
https://people.linaro.org/~peter.maydell/raspi-avocado-fail.log
what seems to happen is that the test sends the "halt" command to
the guest. The DEBUG log reports a transition from RUNNING to
DISCONNECTING and the QMP connection disconnects, so presumably
the guest really did exit -- or is that something the test framework
is doing from its end? Anyway, the next thing that happens is
that after a 30s timeout something (the avocado framework?) sends
the QEMU process a SIGTERM, and there's a bunch of timeout related
python backtraces in the log.

In comparison, with a pass
https://people.linaro.org/~peter.maydell/raspi-avocado-pass.log
the transition from DISCONNECTING to IDLE is followed within about
5 seconds by a test pass.

So:

(1) has anybody looked at what's happening in this test in
particular?
(2) is it possible for avocado to log all of the communication
on the serial console? Currently the logging of what the guest
prints cuts out early (in both success and failure cases),
and what the test case sends to the guest is not logged at all
(3) what's the best way to debug this to figure out what's
actually happening?

I tried passing timeout=None to the self.vm.wait() call in
test_arm_raspi2_initrd(), which the comments in machine.py
is supposed to mean "wait forever", but that didn't actually
seem to change the timeout. (I had the idea of looking at
the status of the QEMU process etc at that point.)

thanks
-- PMM

Reply via email to