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
This commit is contained in:
parent
fe1e5cc805
commit
62b61b8552
@ -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)
|
static void test_acpi_microvm_tcg(void)
|
||||||
{
|
{
|
||||||
test_data data;
|
test_data data;
|
||||||
|
|
||||||
memset(&data, 0, sizeof(data));
|
test_acpi_microvm_prepare(&data);
|
||||||
data.machine = "microvm";
|
|
||||||
data.required_struct_types = NULL; /* no smbios */
|
|
||||||
data.required_struct_types_len = 0;
|
|
||||||
data.blkdev = "virtio-blk-device";
|
|
||||||
test_acpi_one(" -machine microvm,acpi=on,rtc=off",
|
test_acpi_one(" -machine microvm,acpi=on,rtc=off",
|
||||||
&data);
|
&data);
|
||||||
free_test_data(&data);
|
free_test_data(&data);
|
||||||
|
Loading…
Reference in New Issue
Block a user