From fc5fa9036af0a72b89a426d3b06148975bd81278 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 7 Nov 2016 09:35:17 +0100 Subject: tests: let lsmod fail silently This is mostly for non-Linux systems where lsmod is not even available. Signed-off-by: Ruediger Meier --- tests/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/functions.sh') 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 -- cgit v1.2.3-55-g7522