[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/qtest/boot-sector: Check that the guest did not panic
From: |
John Snow |
Subject: |
Re: [PATCH] tests/qtest/boot-sector: Check that the guest did not panic |
Date: |
Mon, 15 Feb 2021 14:17:53 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/12/21 8:18 AM, Philippe Mathieu-Daudé wrote:
Interesting idea. Does it make sense to have a similar (optional?) check
done in QEMUMachine? This could benefit integration tests, quicker exit
on failure.
That might be the wrong layer to do it in. I am trying to keep
QEMUMachine be the mechanisms, not the policy. Not all QEMUMachine
instances even have a QMP socket, either.
Having shared code (somewhere) that allows you to do stuff like issue a
query status every sec to do a more pro-active heartbeat check on-demand
is probably a good idea, though:
e.g.
vm = QEMUManagedMachine(...)
with vm.start_heartbeat() as heartbeat:
... do things prone to failure here ...
...
...
# as of here, the heartbeat has been stopped
It might be worth looking into creating a "value-added" version of
QEMUMachine that offers stuff like this, in a manner similar to how
iotests has its own extended versions of the QEMUMachine to offer
test-specific behavior.
(Patches welcome!)
--js