Whamcloud - gitweb
LU-3880 tests: Allow error_ignore to accept any bug number 91/7791/2
authorJames Nunez <james.a.nunez@intel.com>
Fri, 27 Sep 2013 22:00:21 +0000 (16:00 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 25 Oct 2013 02:43:56 +0000 (02:43 +0000)
error_ignore is called when a test and an error is encountered
that is supposed to be ignored. The first argument to
error_ignore is a bug number, justification as to why the error
should be ignored, that the routine assumes is a bugzilla bug
number and automatically attaches a “bz” prefix to the number.
This patch removes the assumption that all bug numbers are bugzilla
numbers and moves adding the “bz” to the bug number to the
individual calls to error_ignore. Now, we can use “LU” bug
numbers with error ignore.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I40c47ccf6af76e76bff99c67816e0d2aebd37e71
Reviewed-on: http://review.whamcloud.com/7791
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
lustre/tests/ost-pools.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-single.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index c3a5609..dd13c6b 100644 (file)
@@ -998,17 +998,17 @@ test_18() {
     # is / should be
     max=30
     diff=$((($files1 - $files2) * 100 / $files1))
-    echo  "No pool / wide pool: $diff %."
-    [ $diff -gt $max ] &&
-        error_ignore 23408 "Degradation with wide pool is $diff% > $max%"
+       echo  "No pool / wide pool: $diff %."
+       [ $diff -gt $max ] &&
+               error_ignore bz23408 "Degradation with wide pool is $diff% > $max%"
 
-    max=30
-    diff=$((($files1 - $files3) * 100 / $files1))
-    echo  "No pool / missing pool: $diff %."
-    [ $diff -gt $max ] &&
-        error_ignore 23408 "Degradation with wide pool is $diff% > $max%"
+       max=30
+       diff=$((($files1 - $files3) * 100 / $files1))
+       echo  "No pool / missing pool: $diff %."
+       [ $diff -gt $max ] &&
+               error_ignore bz23408 "Degradation with wide pool is $diff% > $max%"
 
-    return 0
+       return 0
 }
 run_test 18 "File create in a directory which references a deleted pool"
 
index bdee5ec..a07c407 100755 (executable)
@@ -767,7 +767,8 @@ test_24a() { # bug 11710 details correct fsync() behavior
        rc=$?
        lctl set_param fail_loc=0x0
        client_reconnect
-       [ $rc -eq 0 ] && error_ignore 5494 "multiop didn't fail fsync: rc $rc" || true
+       [ $rc -eq 0 ] &&
+               error_ignore bz5494 "multiop didn't fail fsync: rc $rc" || true
 }
 run_test 24a "fsync error (should return error)"
 
@@ -807,10 +808,10 @@ test_24b() {
        lctl set_param fail_loc=0x0
        client_reconnect
        [ $rc1 -eq 0 -o $rc2 -eq 0 ] &&
-       error_ignore 5494 "multiop didn't fail fsync: $rc1 or close: $rc2" ||
+       error_ignore bz5494 "multiop didn't fail fsync: $rc1 or close: $rc2" ||
                true
 
-       dmesg | grep "dirty page discard:" || \
+       dmesg | grep "dirty page discard:" ||
                error "no discarded dirty page found!"
 }
 run_test 24b "test dirty page discard due to client eviction"
@@ -959,7 +960,8 @@ test_50() {
        rc=$?
        echo writemany returned $rc
        #these may fail because of eviction due to slow AST response.
-       [ $rc -eq 0 ] || error_ignore 13652 "writemany returned rc $rc" || true
+       [ $rc -eq 0 ] ||
+               error_ignore bz13652 "writemany returned rc $rc" || true
 }
 run_test 50 "failover MDS under load"
 
@@ -988,10 +990,11 @@ test_51() {
        # and recovery was interrupted
        sleep $TIMEOUT
         kill -USR1 $CLIENT_PID
-       wait $CLIENT_PID 
+       wait $CLIENT_PID
        rc=$?
        echo writemany returned $rc
-       [ $rc -eq 0 ] || error_ignore 13652 "writemany returned rc $rc" || true
+       [ $rc -eq 0 ] ||
+               error_ignore bz13652 "writemany returned rc $rc" || true
 }
 run_test 51 "failover MDS during recovery"
 
@@ -1185,12 +1188,12 @@ test_59() { # bug 10589
 run_test 59 "Read cancel race on client eviction"
 
 err17935 () {
-    # we assume that all md changes are in the MDT0 changelog
-    if [ $MDSCOUNT -gt 1 ]; then
-       error_ignore 17935 $*
-    else
-       error $*
-    fi
+       # we assume that all md changes are in the MDT0 changelog
+       if [ $MDSCOUNT -gt 1 ]; then
+               error_ignore bz17935 $*
+       else
+               error $*
+       fi
 }
 
 test_60() {
index 3086976..87e73b9 100755 (executable)
@@ -1769,8 +1769,9 @@ test_67a() #bug 3055
     CONN2=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
     ATTEMPTS=$(($CONN2 - $CONN1))
     echo "$ATTEMPTS osc reconnect attempts on gradual slow"
-    [ $ATTEMPTS -gt 0 ] && error_ignore 13721 "AT should have prevented reconnect"
-    return 0
+       [ $ATTEMPTS -gt 0 ] &&
+               error_ignore bz13721 "AT should have prevented reconnect"
+       return 0
 }
 run_test 67a "AT: verify slow request processing doesn't induce reconnects"
 
index 9e1deb6..c4035d4 100644 (file)
@@ -6689,7 +6689,7 @@ test_116a() { # was previously test_116()
                echo "ok"
        else
                echo "failed - QOS mode won't be used"
-               error_ignore 0000 "QOS imbalance criteria not met"
+               skip "QOS imbalance criteria not met"
                simple_cleanup_common
                return
        fi
@@ -6743,8 +6743,7 @@ test_116a() { # was previously test_116()
        [ $MINC -gt 0 ] &&
                echo "Wrote ${FILL}% more files to larger OST $MAXI1"
        [ $MAXC -gt $MINC ] ||
-               error_ignore 0000 "stripe QOS didn't balance free space"
-
+               error_ignore LU-9 "stripe QOS didn't balance free space"
        simple_cleanup_common
 }
 run_test 116a "stripe QOS: free space balance ==================="
@@ -9303,12 +9302,11 @@ test_156() {
     BEFORE=`roc_hit`
     cat $file >/dev/null
     AFTER=`roc_hit`
-    if ! let "AFTER - BEFORE == 0"; then
-        error_ignore 20762 "IN CACHE: before: $BEFORE, after: $AFTER"
-    else
-        log "cache hits:: before: $BEFORE, after: $AFTER"
-    fi
-
+       if ! let "AFTER - BEFORE == 0"; then
+               error_ignore bz20762 "IN CACHE: before: $BEFORE, after: $AFTER"
+       else
+               log "cache hits:: before: $BEFORE, after: $AFTER"
+       fi
 
     log "Turn on the read cache and turn off the write cache"
     set_cache read on
@@ -9322,11 +9320,11 @@ test_156() {
     cancel_lru_locks osc
     cat $file >/dev/null
     AFTER=`roc_hit`
-    if ! let "AFTER - BEFORE == 0"; then
-        error_ignore 20762 "IN CACHE: before: $BEFORE, after: $AFTER"
-    else
-        log "cache hits:: before: $BEFORE, after: $AFTER"
-    fi
+       if ! let "AFTER - BEFORE == 0"; then
+               error_ignore bz20762 "IN CACHE: before: $BEFORE, after: $AFTER"
+       else
+               log "cache hits:: before: $BEFORE, after: $AFTER"
+       fi
 
     log "Read again; it should be satisfied from the cache."
     BEFORE=`roc_hit`
@@ -9346,7 +9344,7 @@ run_test 156 "Verification of tunables ============================"
 #Changelogs
 err17935 () {
        if [ $MDSCOUNT -gt 1 ]; then
-               error_ignore 17935 $*
+               error_ignore bz17935 $*
        else
                error $*
        fi
index 1ba5230..c348dfa 100644 (file)
@@ -4302,9 +4302,10 @@ error_exit() {
 
 # use only if we are ignoring failures for this test, bugno required.
 # (like ALWAYS_EXCEPT, but run the test and ignore the results.)
-# e.g. error_ignore 5494 "your message"
+# e.g. error_ignore bz5494 "your message" or
+# error_ignore LU-5494 "your message"
 error_ignore() {
-       local TYPE="IGNORE (bz$1)"
+       local TYPE="IGNORE ($1)"
        shift
        error_noexit "$@"
 }