qemu-server/test
Dominik Csapak 844b55fb89 fix #2510: hostpci: always check if device exists
if the user set a device as hostpci with the 'shorthand' syntax:

hostpciX: 00:12

we ignored it on starting and showcmd and continued.
Since the user explicitly wanted to passthrough a device, we now check
if there is actually a device with that id

for explicitly configured devices (00:12.1), we did not check if it exists,
but the kvm call failed with a non-obvious error message

now we always call 'lspci' from SysFSTools to check if it actually exists,
and fail if not. With this, we can drop the workaround for adding
'0000' if no domain was given, since lspci does it already for us

this fixes #2510, an issue with using mediated devices where the users did not have
the domain in the config, since we forgot to add the default domain there

the only issue with this patch is that it changes the behaviour of
'showcmd' slightly, as in now, we die if the device was explicitly
given, but did not exists (we showed the commandline, now we fail)

this also slightly changes the commandline for qemu (adding always
the domain), which is not a problem since we cannot live migrate
or snapshot such vms, but we have to adapt the tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 11:30:14 +01:00
..
cfg2cmd fix #2510: hostpci: always check if device exists 2019-12-09 11:30:14 +01:00
ovf_manifests Add tests for parse_ovf function 2017-09-25 13:31:55 +02:00
snapshot-expected add new tests for 'runningmachine' and rollback 2018-09-17 15:49:31 +02:00
snapshot-input add new tests for 'runningmachine' and rollback 2018-09-17 15:49:31 +02:00
Makefile add tests for qemu_img_convert 2019-10-17 13:57:21 +02:00
run_config2command_tests.pl cfg2cmd test: add tests for multifunction devices 2019-12-09 11:30:14 +01:00
run_ovf_tests.pl Add tests for parse_ovf function 2017-09-25 13:31:55 +02:00
run_pci_addr_checks.pl move qemu-configs to own directory 2019-09-24 18:59:35 +02:00
run_qemu_img_convert_tests.pl fix #2469: fix qemu-img convert src_format detection 2019-12-09 10:31:33 +01:00
run_snapshot_tests.pl tests: exit with -1 in case of failures 2017-05-17 13:58:18 +02:00
snapshot-test.pm followup snapshot-test: pass class to cfs_config_path 2019-11-20 19:05:14 +01:00
test_get_replicatable_volumes.pl add regression tests for get_replicatable_volumes 2017-06-14 07:02:43 +02:00
test.vmdk fix #2395: refactor qemu_img_convert to accept files as source 2019-10-17 13:57:21 +02:00