Skip to content

Commit bde46ad

Browse files
committed
refactor the vfio test to make sure thet vfio_pci is loaded after the test
1 parent 3e5dc63 commit bde46ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

providers/base/units/intel-qat/jobs.pxu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ _description: Check that VFIO-PCI support is enabled for the device
102102
each VF will have it own character file in /dev/vfio/
103103
command:
104104
rmmod vfio-pci || true
105-
nb_vfio=$(qatctl.py status --devices {{ pf }} --vfio | wc -l)
106-
[ "$nb_vfio" -le 0 ] || (echo "nb vfio devices should be <= 0" && exit 1)
105+
nb_vfio_before=$(qatctl.py status --devices {{ pf }} --vfio | wc -l)
107106
# we have to pass the VF device ids
108107
modprobe vfio-pci ids=8086:4941,8086:4943,8086:4945,8086:4947
109-
nb_vfio=$(qatctl.py status --devices {{ pf }} --vfio | wc -l)
110-
[ "$nb_vfio" -gt 0 ] || (echo "nb vfio devices should be > 0" && exit 1)
108+
nb_vfio_after=$(qatctl.py status --devices {{ pf }} --vfio | wc -l)
109+
[ "$nb_vfio_before" -le 0 ] || (echo "nb vfio devices should be <= 0" && exit 1)
110+
[ "$nb_vfio_after" -gt 0 ] || (echo "nb vfio devices should be > 0" && exit 1)
111111

112112
unit: template
113113
template-resource: qat_pf

0 commit comments

Comments
 (0)