summary refs log tree commit diff stats
path: root/tests/qtest/bios-tables-test.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-11-15 16:50:40 +0000
committerFabiano Rosas <farosas@suse.de>2024-12-12 10:25:38 -0300
commit9881d3d1687d1f18dc605a589d13ae5b8a9db456 (patch)
treeb1d780b5bd81eec80e9f63a61cb87d4665aebb5a /tests/qtest/bios-tables-test.c
parent6b76264ed0fed402df09aab8edacf1ee03d87c7f (diff)
downloadfocaccia-qemu-9881d3d1687d1f18dc605a589d13ae5b8a9db456.tar.gz
focaccia-qemu-9881d3d1687d1f18dc605a589d13ae5b8a9db456.zip
tests/qtest: Use qtest_system_reset() instead of open-coded versions
Use the qtest_system_reset() function in various tests that were
previously open-coding the system-reset. Note that in several
cases this fixes a bug where the test did not wait for the RESET
QMP event before continuing.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'tests/qtest/bios-tables-test.c')
-rw-r--r--tests/qtest/bios-tables-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 16d0ffbdf6..6035ec2c61 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -959,7 +959,7 @@ static void test_acpi_piix4_tcg_bridge(void)
     free_test_data(&data);
 
     /* check that reboot/reset doesn't change any ACPI tables  */
-    qtest_qmp_send(data.qts, "{'execute':'system_reset' }");
+    qtest_system_reset(data.qts);
     process_acpi_tables(&data);
     free_test_data(&data);
 }
@@ -1216,7 +1216,7 @@ static void test_acpi_q35_multif_bridge(void)
     free_test_data(&data);
 
     /* check that reboot/reset doesn't change any ACPI tables  */
-    qtest_qmp_send(data.qts, "{'execute':'system_reset' }");
+    qtest_system_reset(data.qts);
     process_acpi_tables(&data);
     free_test_data(&data);
 }