[Accel-config] [PATCH v1 1/1] accel-config/test: load/unload idxd_vdev and iaa_crypto modules at cleanup

Tony Zhu <tony.zhu at intel.com> Wed, 24 Aug 2022 12:07:12 +0800
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
--===============1997786006925633346==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

idxd_vdev replaces idxd_mdev and iaa_crypto replaces iax_crypto. Add
unloading of them which is dependent on idxd. Don't remove idxd_mdev
and iax_crypto for the compatibility of tests.

Signed-off-by: Tony Zhu <tony.zhu(a)intel.com>
---
 test/common | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/common b/test/common
index 2f0d1bb..b461f17 100644
--- a/test/common
+++ b/test/common
@@ -39,12 +39,12 @@ else
 	exit "$EXIT_FAILURE"
 fi
 =

-# IAATEST
+# IAXTEST
 #
 if [ -f "./iaa_test" ] && [ -x "./iaa_test" ]; then
-	export IAATEST=3D./iaa_test
+	export IAXTEST=3D./iaa_test
 elif [ -f "$TESTDIR/iaa_test" ] && [ -x "$TESTDIR/iaa_test" ]; then
-	export IAATEST=3D"$TESTDIR"/iaa_test
+	export IAXTEST=3D"$TESTDIR"/iaa_test
 else
 	echo "Couldn't find an iaa_test binary"
 	exit "$EXIT_FAILURE"
@@ -124,9 +124,15 @@ _cleanup()
 	lsmod | grep -q "idxd_mdev" && {
 		rmmod idxd_mdev
 	}
+	lsmod | grep -q "idxd_vdev" && {
+		rmmod idxd_vdev
+	}
 	lsmod | grep -q "idxd_uacce" && {
 		rmmod idxd_uacce
 	}
+	lsmod | grep -q "iaa_crypto" && {
+		rmmod iaa_crypto
+	}
 	lsmod | grep -q "iax_crypto" && {
 		rmmod iax_crypto
 	}
-- =

2.27.0

--===============1997786006925633346==--