Skip to content

Commit

Permalink
test/common: be less greedy in _cleanup greps
Browse files Browse the repository at this point in the history
vfio_pci_ims can satisfy the grep for vfio_pci, resulting in it
attempting to rmmod vfio_pci, which isn't loaded. This results in the
following error:

ERROR: Module vfio_pci is not currently loaded

While we're at it, be less greedy in all the greps in _cleanup.

Signed-off-by: California Sullivan <[email protected]>
Signed-off-by: Ramesh Thomas <[email protected]>
  • Loading branch information
clsulliv authored and ramesh-thomas committed Oct 26, 2023
1 parent 5f57ffd commit 0968922
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/common
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,22 @@ check_prereq()
#
_cleanup()
{
lsmod | grep -q "idxd_vdev" && {
lsmod | grep -wq idxd_vdev && {
rmmod idxd_vdev
}
lsmod | grep -q "idxd_uacce" && {
lsmod | grep -wq idxd_uacce && {
rmmod idxd_uacce
}
lsmod | grep -q "iaa_crypto" && {
lsmod | grep -wq iaa_crypto && {
rmmod iaa_crypto
}
lsmod | grep -q "iax_crypto" && {
lsmod | grep -wq iax_crypto && {
rmmod iax_crypto
}
lsmod | grep -q "idxd" && {
lsmod | grep -wq idxd && {
rmmod idxd
}
lsmod | grep -q "vfio_pci" && {
lsmod | grep -wq vfio_pci && {
rmmod vfio_pci
}
sleep 1
Expand Down

0 comments on commit 0968922

Please sign in to comment.