From cfa88603a29250bc3c8c3546f56f2c79d107a1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 29 Oct 2021 12:04:49 +0100 Subject: [PATCH] tests: use different USB device when testing hot-add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Libvirt now validates that all elements refer to distinct host devices. The test suite violates that constraint by trying to hot-add a device that alreadye exists in the config. Signed-off-by: Daniel P. Berrangé --- .../data/cli/compare/virt-xml-add-host-device.xml | 6 +++--- tests/data/testdriver/testsuite.xml | 14 ++++++++++++++ tests/test_cli.py | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/data/cli/compare/virt-xml-add-host-device.xml b/tests/data/cli/compare/virt-xml-add-host-device.xml index 099fe8534..20ad8d844 100644 --- a/tests/data/cli/compare/virt-xml-add-host-device.xml +++ b/tests/data/cli/compare/virt-xml-add-host-device.xml @@ -3,8 +3,8 @@ + + -+ -+ ++ ++ + + @@ -12,4 +12,4 @@ Domain 'test-for-virtxml' defined successfully. -Changes will take effect after the domain is fully powered off. \ No newline at end of file +Changes will take effect after the domain is fully powered off. diff --git a/tests/data/testdriver/testsuite.xml b/tests/data/testdriver/testsuite.xml index a073cbce5..2b4f7679f 100644 --- a/tests/data/testdriver/testsuite.xml +++ b/tests/data/testdriver/testsuite.xml @@ -743,6 +743,20 @@ + + usb_device_483_2016_noserial + usb_device_1d6b_1_0000_00_1a_0 + + usb + + + 3 + 2 + Fingerprint Reader + SGS Thomson Microelectronics + + + mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110 /sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110 diff --git a/tests/test_cli.py b/tests/test_cli.py index 3d41e3579..98869a5be 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1350,7 +1350,7 @@ c = vixml.add_category("add/rm devices", "test-for-virtxml --print-diff --define c.add_valid("--add-device --security model=dac") # --add-device works for seclabel c.add_invalid("--add-device --pm suspend_to_disk=yes") # --add-device without a device c.add_invalid("--remove-device --clock utc") # --remove-device without a dev -c.add_compare("--add-device --host-device usb_device_4b3_4485_noserial", "add-host-device") +c.add_compare("--add-device --host-device usb_device_483_2016_noserial", "add-host-device") c.add_compare("--add-device --sound pcspk", "add-sound") c.add_compare("--add-device --disk %(EXISTIMG1)s,bus=virtio,target=vdf", "add-disk-basic") c.add_compare("--add-device --disk %(EXISTIMG1)s", "add-disk-notarget") # filling in acceptable target