]> xenbits.xensource.com Git - libvirt.git/commit
virpcitest: Introduce testVirPCIDeviceReset
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Nov 2013 14:07:49 +0000 (15:07 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 6 Nov 2013 08:34:17 +0000 (09:34 +0100)
commit21685c955e546676a5b2a01f7b788d222e0ee0f5
tree6bd5a8b4553a7dae7b9b35102acd4e67d31ec611
parent12dc729a711ef586ba632e90ff48667b4176f41f
virpcitest: Introduce testVirPCIDeviceReset

This addition, however, requires some refactoring to be done.  First of
all, to match the best practice we should detach the device prior
resetting it. That's why testVirPCIDeviceDetach is detaching all devices
within 0000:00:01.0 and 0000:00:03.0 range. Then, the brand new test
will reset the 0000:00:02.0 device, so the last testVirPCIDeviceReattach
can reattach all the devices back.

In order to perform a PCI device reset, the dummy config file is not
sufficient anymore and must be replaced with real PCI config (binary
mess). Such config files are to be stored under tests/virpcitestdata/
and ought to have '.config' suffix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
cfg.mk
tests/virpcimock.c
tests/virpcitest.c
tests/virpcitestdata/0000:00:01.0.config [new file with mode: 0644]
tests/virpcitestdata/0000:00:02.0.config [new file with mode: 0644]
tests/virpcitestdata/0000:00:03.0.config [new file with mode: 0644]