[LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt
Petr Vorel
pvorel@suse.cz
Fri Feb 21 13:13:44 CET 2025
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
More information about the ltp
mailing list