]> Git Repo - qemu.git/commitdiff
tests/acpi: factor out common microvm test setup
authorGerd Hoffmann <[email protected]>
Mon, 28 Sep 2020 10:42:53 +0000 (12:42 +0200)
committerGerd Hoffmann <[email protected]>
Wed, 30 Sep 2020 09:29:56 +0000 (11:29 +0200)
... into new test_acpi_microvm_prepare helper

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-id: 20200928104256[email protected]

tests/qtest/bios-tables-test.c

index 3c09b844f9de17064e8f3961f2938bbdcfb4919a..7be2b3131e16a193c773bc6c46f58b9001640bea 100644 (file)
@@ -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);
This page took 0.033378 seconds and 4 git commands to generate.