All of lore.kernel.org
 help / color / mirror / Atom feed
* [Accel-config] [PATCH] accel-config/test: load/unload uacce module at cleanup
@ 2021-04-06  0:45 ramesh.thomas
  0 siblings, 0 replies; only message in thread
From: ramesh.thomas @ 2021-04-06  0:45 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

From: Ramesh Thomas <ramesh.thomas(a)intel.com>

Cleanup unloads and reloads all idxd kernel modules. This is broken due
to idxd_module depending on idxd module. The order of idxd_mdev and
idxd_uacce modules are not fixed requiring additional checks during the
process.

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

diff --git a/test/common b/test/common
index 4bd4ed3..e6e84dd 100644
--- a/test/common
+++ b/test/common
@@ -99,6 +99,14 @@ check_prereq()
 #
 _cleanup()
 {
+	lsmod | grep -q "idxd_mdev" && {
+		modprobe -r idxd_mdev 2>/dev/null || :
+		sleep 1
+	}
+	lsmod | grep -q "idxd_uacce" && {
+		modprobe -r idxd_uacce
+		sleep 1
+	}
 	lsmod | grep -q "idxd_mdev" && {
 		modprobe -r idxd_mdev
 		sleep 1
@@ -108,6 +116,7 @@ _cleanup()
 		sleep 1
 	}
 	modprobe idxd
+	sleep 1
 }
 
 # json2var
-- 
2.26.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-06  0:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  0:45 [Accel-config] [PATCH] accel-config/test: load/unload uacce module at cleanup ramesh.thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.