All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt
@ 2025-02-21 12:13 Petr Vorel
  2025-02-21 13:13 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-02-21 12:13 UTC (permalink / raw)
  To: ltp; +Cc: Takashi Iwai

zcrypt (s390x specific module) has different refcnt:

    lsmod01 1 TINFO: lsmod output different from /proc/modules
    118c118
    < zcrypt 131072 9
    ---
    > zcrypt 131072 8

This is probably due libcrypto update to support hardware acceleration
of some algorithm that kmod is using, which causes increasing refcnt.

Because it's would not be easy to get a generic mechanism to detect
affected modules (ATM probably only zcrypt), whitelist parsing it.

Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1237399
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/commands/lsmod/lsmod01.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
index 8b7a0a7943..1fe399aa06 100755
--- a/testcases/commands/lsmod/lsmod01.sh
+++ b/testcases/commands/lsmod/lsmod01.sh
@@ -14,6 +14,9 @@ TST_NEEDS_CMDS="lsmod"
 
 module_inserted=
 
+# zcrypt has higher refcnt
+whitelist_modules='zcrypt'
+
 setup()
 {
 	if [ -z "$(cat /proc/modules)"  ]; then
@@ -55,8 +58,8 @@ lsmod_matches_proc_modules()
 	if [ "$lsmod_output" != "$modules_output" ]; then
 		tst_res TINFO "lsmod output different from /proc/modules"
 
-		echo "$lsmod_output" > temp1
-		echo "$modules_output" > temp2
+		echo "$lsmod_output" | grep -v "^$whitelist_modules" > temp1
+		echo "$modules_output" | grep -v "^$whitelist_modules" > temp2
 		if tst_cmd_available diff; then
 			diff temp1 temp2
 		else
-- 
2.47.2


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-21 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 12:13 [LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt Petr Vorel
2025-02-21 13:13 ` Cyril Hrubis
2025-02-21 13:33   ` Petr Vorel

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.