This change adds negative argv2xml unit tests for the following change: 78ced83e3bb354 ("pm/i386: add support for two options that controls acpi hotplug on q35/i440fx")
These tests ensure that libvirt produces the correct error when the qemu capabilities required from an input xml are absent. Signed-off-by: Ani Sinha <a...@anisinha.ca> --- .../qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.err | 1 + tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.err | 1 + tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.err | 1 + tests/qemuxml2argvtest.c | 3 +++ 4 files changed, 6 insertions(+) create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.err create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.err create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.err changelog: v1: not present. v2: added this new test. diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.err new file mode 100644 index 0000000000..98211b726f --- /dev/null +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.err @@ -0,0 +1 @@ +unsupported configuration: setting ACPI hotplug bridge not supported diff --git a/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.err b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.err new file mode 100644 index 0000000000..c5c9de8389 --- /dev/null +++ b/tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.err @@ -0,0 +1 @@ +unsupported configuration: setting ACPI root pci hotplug not supported diff --git a/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.err b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.err new file mode 100644 index 0000000000..98211b726f --- /dev/null +++ b/tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.err @@ -0,0 +1 @@ +unsupported configuration: setting ACPI hotplug bridge not supported diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 75a7acdfe8..7d83937f48 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2652,6 +2652,9 @@ mymain(void) QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG); + DO_TEST_PARSE_ERROR("q35-acpi-hotplug-bridge-enable", NONE); + DO_TEST_PARSE_ERROR("pc-i440fx-acpi-hotplug-bridge-enable", NONE); + DO_TEST_PARSE_ERROR("pc-i440fx-acpi-root-hotplug-enable", NONE); DO_TEST("q35-usb2", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, -- 2.25.1