libvirt/tests/nodedevmdevctldata
Jonathon Jongsma 51fbbfdce8 nodedev: fix parent device of inactive mdevs
Inactive mdevs were simply formatting their parent name as the value
received from mdevctl rather than looking up the libvirt nodedev name of
the parent device. This resulted in a parent value of e.g.
'0000:5b:00.0' instead of 'pci_0000_5b_00_0'. This prevented defining a
new mdev device from the output of nodedev-dumpxml.

Unfortunately, it's not simple to fix this comprehensively due to the
fact that mdevctl supports defining (inactive) mdevs for parent devices
that do not actually exist on the host (yet). So for those persistent
mdev definitions that do not have a valid parent in the device list, the
parent device will be set to the root "computer" device.

Unfortunately, because the value of the 'parent' field now depends on
the configuration of the host, the mdevctl parsing test will output
'computer' for all test devices. Fixing this would require a more
extensive mock test environment.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979761

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-07-19 11:25:43 +02:00
..
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.json nodedev: driver: Swap virMdevctlStart and virMdevctlCreate 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.json nodedev: add function to generate mdevctl define command 2021-04-07 15:08:59 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-stop.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-undefine.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.json nodedev: driver: Swap virMdevctlStart and virMdevctlCreate 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.json nodedev: add function to generate mdevctl define command 2021-04-07 15:08:59 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.json nodedev: driver: Swap virMdevctlStart and virMdevctlCreate 2021-04-19 10:24:13 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.json nodedev: add function to generate mdevctl define command 2021-04-07 15:08:59 -05:00
mdevctl-list-defined.argv nodedevmdevctltest: Use internal linewrapping and variable command path stripping 2021-04-12 15:55:10 +02:00
mdevctl-list-multiple.json nodedev: handle mdevs from multiple parents 2021-07-01 16:34:03 +02:00
mdevctl-list-multiple.out.xml nodedev: fix parent device of inactive mdevs 2021-07-19 11:25:43 +02:00