device-drivers/zram: zram_lib: Fix modinfo's usage
PATCH 1/1 device-drivers/zram: zram_lib: Fix modinfo's usage
zram_lib uses the exit code of modinfo to determine the presence of zram module, but the exit code does not have direct relation to it.
We could be missing zram module and modinfo still exits "successfully" because it has done its job of informing the user zram is missing.
Such behavior would give confusing zram test report. Without this patch, some of the system run LTP without zram module would have a FAIL instead of CONF as a result.
--- testcases/kernel/device-drivers/zram/zram_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/device-drivers/zram/zram_lib.sh +1 -1
@@ -211,5 +211,5 @@ zram_mount() tst_res TPASS "mount of zram device(s) succeeded" } -modinfo zram > /dev/null 2>&1 || +modinfo zram 2>&1 | grep filename > /dev/null 2>&1 || tst_brk TCONF "zram not configured in kernel"
Signature · 1 line
2.17.0
PATCH 1/1 device-drivers/zram: zram_lib: Fix modinfo's usage
Hi!
Quoted 2 lines
zram_libuses the exit code of modinfo to determine the presence of zram module, but the exit code does not have direct relation to it.
What distribution is this? Where did the modinfo binary came from?
It works fine with modinfo from the kmod packages, see:
https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/tree/tools/modinfo.c#n463
Signature · 2 lines
Cyril Hrubis [email protected]