From: Ruediger Meier Date: Mon, 7 Nov 2016 08:35:17 +0000 (+0100) Subject: tests: let lsmod fail silently X-Git-Tag: v2.29~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc5fa9036af0a72b89a426d3b06148975bd81278;p=thirdparty%2Futil-linux.git tests: let lsmod fail silently This is mostly for non-Linux systems where lsmod is not even available. Signed-off-by: Ruediger Meier --- diff --git a/tests/functions.sh b/tests/functions.sh index fe3ff5751e..9239ab4f6d 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