qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] qtest: Provide and use function for doing system reset
@ 2024-11-15 16:50 Peter Maydell
  2024-11-15 16:50 ` [PATCH 1/3] tests/qtest: Add qtest_system_reset() utility function Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Maydell @ 2024-11-15 16:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fabiano Rosas, Laurent Vivier, Paolo Bonzini,
	Roque Arcudia Hernandez

I noticed while reviewing Roque's patchset that adds tests
for the CMSDK watchdog device that we are gradually accumulating
tests in tests/qtest which open-code "now reset the QEMU system".
Moreover, several of those tests get it wrong, by failing to
wait for the QMP RESET event that signals that the reset has
completed.

This series adds new functions qtest_system_reset() and
qtest_system_reset_nowait(), which send the QMP system_reset
command and then either do or do not wait for the RESET event.
It uses them to replace all the places in the test suite
that currently hand-craft sending a system_reset command.

The tests that previously forgot to wait for RESET and now
do so are bios-tables-test, q35-test, stm32l4x5_gpio-test,
and stm32l4x5_syscfg-test.

thanks
-- PMM

Peter Maydell (3):
  tests/qtest: Add qtest_system_reset() utility function
  tests/qtest: Use qtest_system_reset() instead of open-coded versions
  tests/qtest: Use qtest_system_reset_nowait() where appropriate

 tests/qtest/libqtest.h              | 25 +++++++++++++++++++++++++
 tests/qtest/bios-tables-test.c      |  4 ++--
 tests/qtest/boot-order-test.c       |  7 +------
 tests/qtest/device-plug-test.c      | 11 +----------
 tests/qtest/drive_del-test.c        |  7 +------
 tests/qtest/hd-geo-test.c           |  9 +--------
 tests/qtest/libqtest.c              | 16 ++++++++++++++++
 tests/qtest/q35-test.c              | 12 ++----------
 tests/qtest/qos-test.c              |  3 +--
 tests/qtest/stm32l4x5_gpio-test.c   | 10 +---------
 tests/qtest/stm32l4x5_syscfg-test.c | 12 ++----------
 11 files changed, 53 insertions(+), 63 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-22 13:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 16:50 [PATCH 0/3] qtest: Provide and use function for doing system reset Peter Maydell
2024-11-15 16:50 ` [PATCH 1/3] tests/qtest: Add qtest_system_reset() utility function Peter Maydell
2024-11-18 10:30   ` Philippe Mathieu-Daudé
2024-11-15 16:50 ` [PATCH 2/3] tests/qtest: Use qtest_system_reset() instead of open-coded versions Peter Maydell
2024-11-18 10:29   ` Philippe Mathieu-Daudé
2024-11-15 16:50 ` [PATCH 3/3] tests/qtest: Use qtest_system_reset_nowait() where appropriate Peter Maydell
2024-11-22 13:00   ` Fabiano Rosas
2024-11-22 13:07 ` [PATCH 0/3] qtest: Provide and use function for doing system reset Fabiano Rosas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).