[LTP] [PATCH 1/1] lsmod01.sh: Whitelist zcrypt
Cyril Hrubis
chrubis@suse.cz
Fri Feb 21 14:13:36 CET 2025
Hi!
> 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
I read the bug, I guess that there isn't anything better than doing
this.
> 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
Maybe a bit better description:
# lsmod triggers zcrypt refcount increase if it links against libssl
# which uses hardware acceleration
Other than that:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
> +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
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list