summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorRuediger Meier2016-11-07 09:35:17 +0100
committerKarel Zak2016-11-07 10:51:43 +0100
commitfc5fa9036af0a72b89a426d3b06148975bd81278 (patch)
treef39a7e704a5c26dc5fb50e3270daff8fb22b9450 /tests/functions.sh
parenttests: always quote $LODEV (diff)
downloadkernel-qcow2-util-linux-fc5fa9036af0a72b89a426d3b06148975bd81278.tar.gz
kernel-qcow2-util-linux-fc5fa9036af0a72b89a426d3b06148975bd81278.tar.xz
kernel-qcow2-util-linux-fc5fa9036af0a72b89a426d3b06148975bd81278.zip
tests: let lsmod fail silently
This is mostly for non-Linux systems where lsmod is not even available. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index fe3ff5751..9239ab4f6 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -654,7 +654,7 @@ function ts_scsi_debug_init {
|| ts_skip "cannot load scsi_debug module (modprobe)"
# it might be still not loaded, modprobe.conf or whatever
- lsmod | grep -q "^scsi_debug " \
+ lsmod 2>/dev/null | grep -q "^scsi_debug " \
|| ts_skip "scsi_debug module not loaded (lsmod)"
udevadm settle
@@ -683,7 +683,7 @@ function ts_scsi_debug_rmmod {
# not exist at all.
[ $UID -eq 0 ] || return 0
[ -n "$TS_DEVICE" ] || return 0
- lsmod | grep -q "^scsi_debug " || return 0
+ lsmod 2>/dev/null | grep -q "^scsi_debug " || return 0
udevadm settle