build: remove dead AC_PACKAGE_WANT_NDBM macro
[xfstests-dev.git] / check
diff --git a/check b/check
index 6078b1ef3cc94424cf0535cf7c8dfb4441145c3a..546683c5ec7c6011f7f8b83bce41774b087eb49d 100755 (executable)
--- a/check
+++ b/check
@@ -194,6 +194,7 @@ trim_test_list()
        done
        grep -v -f $tmp.grep <$tmp.list >$tmp.tmp
        mv $tmp.tmp $tmp.list
+       rm -f $tmp.grep
 }
 
 
@@ -250,7 +251,7 @@ _prepare_test_list()
 
        # sort the list of tests into numeric order
        list=`sort -n $tmp.list | uniq`
-       rm -f $tmp.list $tmp.tmp $tmp.grep
+       rm -f $tmp.list
 
        if $randomize
        then
@@ -487,6 +488,19 @@ _check_filesystems()
        fi
 }
 
+_expunge_test()
+{
+       local TEST_ID="$1"
+       if [ -s $tmp.xlist ]; then
+               if grep -q $TEST_ID $tmp.xlist; then
+                       echo "       [expunged]"
+                       return 1
+               fi
+       fi
+       return 0
+}
+
+_init_kmemleak
 _prepare_test_list
 
 if $OPTIONS_HAVE_SECTIONS; then
@@ -656,6 +670,10 @@ for section in $HOST_OPTIONS_SECTIONS; do
            echo -n "$seqnum"
 
            if $showme; then
+               _expunge_test $seqnum
+               if [ $? -eq 1 ]; then
+                       continue
+               fi
                echo
                start=0
                stop=0
@@ -674,11 +692,9 @@ for section in $HOST_OPTIONS_SECTIONS; do
                rm -f $seqres.out.bad
 
                # check if we really should run it
-               if [ -s $tmp.xlist ]; then
-                       if grep $seqnum $tmp.xlist > /dev/null 2>&1 ; then
-                               echo "       [expunged]"
-                               continue
-                       fi
+               _expunge_test $seqnum
+               if [ $? -eq 1 ]; then
+                       continue
                fi
 
                # slashes now in names, sed barfs on them so use grep
@@ -777,6 +793,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
                    n_try=`expr $n_try + 1`
                    _check_filesystems
                    _check_dmesg || err=true
+                   _check_kmemleak || err=true
                fi
 
            fi
@@ -787,7 +804,6 @@ for section in $HOST_OPTIONS_SECTIONS; do
            then
                bad="$bad $seqnum"
                n_bad=`expr $n_bad + 1`
-               quick=false
                tc_status="fail"
            fi
            if $do_report; then
@@ -806,5 +822,5 @@ for section in $HOST_OPTIONS_SECTIONS; do
 done
 
 interrupt=false
-status=`expr $sum_bad`
+status=`expr $sum_bad != 0`
 exit