From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Thu, 21 Jan 2021 14:32:32 +0100 Subject: [LTP] [PATCH v4 2/3] zram: Fix module detection on BusyBox In-Reply-To: <20210121133233.29007-1-pvorel@suse.cz> References: <20210121133233.29007-1-pvorel@suse.cz> Message-ID: <20210121133233.29007-3-pvorel@suse.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it BusyBox modinfo implementation does not exit with 0 when module not found. Our own API implementation used for module detection in tst_check_driver() was fixed in previous commit thus use it. Reported-by: Leo Yu-Chi Liang Signed-off-by: Petr Vorel --- testcases/kernel/device-drivers/zram/zram_lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/device-drivers/zram/zram_lib.sh b/testcases/kernel/device-drivers/zram/zram_lib.sh index 3f4d1d55f..bdbf2453a 100755 --- a/testcases/kernel/device-drivers/zram/zram_lib.sh +++ b/testcases/kernel/device-drivers/zram/zram_lib.sh @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# Copyright (c) 2019 Petr Vorel +# Copyright (c) 2019-2021 Petr Vorel # Author: Alexey Kodanev dev_makeswap=-1 @@ -9,6 +9,7 @@ dev_mounted=-1 TST_NEEDS_TMPDIR=1 TST_SETUP="zram_load" TST_CLEANUP="zram_cleanup" +TST_NEEDS_DRIVERS="zram" . tst_test.sh zram_cleanup() @@ -210,6 +211,3 @@ zram_mount() tst_res TPASS "mount of zram device(s) succeeded" } - -modinfo zram > /dev/null 2>&1 || - tst_brk TCONF "zram not configured in kernel" -- 2.30.0