From cdc5584358e20d12ca28bb190d2f4aae3b14dbb3 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Fri, 27 Sep 2013 16:00:21 -0600 Subject: [PATCH] LU-3880 tests: Allow error_ignore to accept any bug number MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: I40c47ccf6af76e76bff99c67816e0d2aebd37e71 Reviewed-on: http://review.whamcloud.com/7791 Reviewed-by: Andreas Dilger Tested-by: Hudson Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Jian Yu --- lustre/tests/ost-pools.sh | 18 +++++++++--------- lustre/tests/recovery-small.sh | 27 +++++++++++++++------------ lustre/tests/replay-single.sh | 5 +++-- lustre/tests/sanity.sh | 28 +++++++++++++--------------- lustre/tests/test-framework.sh | 5 +++-- 5 files changed, 43 insertions(+), 40 deletions(-) diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index c3a5609..dd13c6b 100644 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -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" diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index bdee5ec..a07c407 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -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() { diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 3086976..87e73b9 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -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" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 9e1deb6..c4035d4 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 1ba5230..c348dfa 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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 "$@" } -- 1.8.3.1