diff options
author | Igor Mammedov <imammedo@redhat.com> | 2023-01-12 15:02:48 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-01-28 06:21:29 -0500 |
commit | c0d19126f39000181a007371b9200fd2e2b0dcc8 (patch) | |
tree | 5f254466f3757ab3c7a51e96190eb4cd00c459b2 /tests/qtest/bios-tables-test.c | |
parent | 2efe88a94863d5ca6ec04126b9090c2c2cd64f97 (diff) |
tests: acpi: add reboot cycle to bridge test
hotplugged bridges should not be described in DSDT,
while it works on cold boot, some ACPPI PCI code
are invoked during reboot.
This patch will let us catch unexpected AML if hotplug
checks are broken.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230112140312.3096331-17-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/qtest/bios-tables-test.c')
-rw-r--r-- | tests/qtest/bios-tables-test.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index b65e864a9c..a8c17461c8 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -812,7 +812,7 @@ static void test_vm_prepare(const char *params, test_data *data) g_free(args); } -static void process_acpi_tables(test_data *data) +static void process_acpi_tables_noexit(test_data *data) { test_acpi_load_tables(data); @@ -831,7 +831,11 @@ static void process_acpi_tables(test_data *data) SmbiosEntryPointType ep_type = test_smbios_entry_point(data); test_smbios_structs(data, ep_type); } +} +static void process_acpi_tables(test_data *data) +{ + process_acpi_tables_noexit(data); qtest_quit(data->qts); } @@ -883,6 +887,11 @@ static void test_acpi_piix4_tcg_bridge(void) qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); + process_acpi_tables_noexit(&data); + free_test_data(&data); + + /* check that reboot/reset doesn't change any ACPI tables */ + qtest_qmp_send(data.qts, "{'execute':'system_reset' }"); process_acpi_tables(&data); free_test_data(&data); } @@ -1005,6 +1014,11 @@ static void test_acpi_q35_multif_bridge(void) qtest_qmp_send(data.qts, "{'execute':'cont' }"); qtest_qmp_eventwait(data.qts, "RESUME"); + process_acpi_tables_noexit(&data); + free_test_data(&data); + + /* check that reboot/reset doesn't change any ACPI tables */ + qtest_qmp_send(data.qts, "{'execute':'system_reset' }"); process_acpi_tables(&data); free_test_data(&data); } |