From 3cfa7fc0c5de25b0c4ac6ba78d8b464cc98a89ce Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 5 Jul 2006 22:13:58 +0000 Subject: [PATCH] Branch b1_5 b=9858 empty grep for leaked mem was exiting script --- lustre/tests/test-framework.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 6a1932b..e21cab7 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -122,11 +122,11 @@ unload_modules() { rmmod $MODULES >/dev/null 2>&1 # do it again, in case we tried to unload ksocklnd too early lsmod | grep lnet > /dev/null && rmmod $MODULES >/dev/null 2>&1 - lsmod | grep lnet && echo "modules still loaded" && return 1 + lsmod | grep lnet && echo "modules still loaded" && cat $LPROC/devices && return 1 HAVE_MODULES=false - LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"` - LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"` + LEAK_LUSTRE=$(dmesg | tail -n 30 | grep "obd mem.*leaked" || true) + LEAK_PORTALS=$(dmesg | tail -n 20 | grep "Portals memory leaked" || true) if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then echo "$LEAK_LUSTRE" 1>&2 echo "$LEAK_PORTALS" 1>&2 @@ -176,7 +176,7 @@ stop() { do_facet ${facet} umount -d $@ ${MOUNT%/*}/${facet} fi - [ -e /proc/fs/lustre ] && grep "ST " /proc/fs/lustre/devices && echo "service didn't stop" && exit 1 + [ -e /proc/fs/lustre ] && grep "ST " $LPROC/devices && echo "service didn't stop" && exit 1 return 0 } -- 1.8.3.1