diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-28 12:42:53 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-30 11:29:56 +0200 |
commit | 62b61b85527ad4460559142dc4a5cfad502a5b01 (patch) | |
tree | 0da990a3505b3f801a745dabca9f9474acfa319e /tests | |
parent | fe1e5cc805586d1f3e558e2a46f952d6e46c5cb0 (diff) |
tests/acpi: factor out common microvm test setup
... into new test_acpi_microvm_prepare helper
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20200928104256.9241-10-kraxel@redhat.com
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/bios-tables-test.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 3c09b844f9..7be2b3131e 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1072,15 +1072,20 @@ static void test_acpi_virt_tcg_memhp(void) } +static void test_acpi_microvm_prepare(test_data *data) +{ + memset(data, 0, sizeof(*data)); + data->machine = "microvm"; + data->required_struct_types = NULL; /* no smbios */ + data->required_struct_types_len = 0; + data->blkdev = "virtio-blk-device"; +} + static void test_acpi_microvm_tcg(void) { test_data data; - memset(&data, 0, sizeof(data)); - data.machine = "microvm"; - data.required_struct_types = NULL; /* no smbios */ - data.required_struct_types_len = 0; - data.blkdev = "virtio-blk-device"; + test_acpi_microvm_prepare(&data); test_acpi_one(" -machine microvm,acpi=on,rtc=off", &data); free_test_data(&data); |