diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index fbcc4209381ccdef792caca0c6195d4ac08182a6..ae099f3d8e6d149a1e93b40a447a268bb8eb2944 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -550,7 +550,7 @@ test_24() { # bug 2248 - eviction fails writeback but app doesn't see it rc=$? sysctl -w lustre.fail_loc=0x0 client_reconnect - [ $rc -eq 0 ] && error "multiop didn't fail fsync: rc $rc" || true + [ $rc -eq 0 ] && error_ignore 5494 "multiop didn't fail fsync: rc $rc" || true } run_test 24 "fsync error (should return error)" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 7f3a1f639bf2702eb35da6f89bda75837c26a209..37f50e501da818493e6ad192c40d64709694ab57 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1032,13 +1032,16 @@ debugrestore() { DEBUGSAVE="" } -FAIL_ON_ERROR=true ################################## # Test interface +################################## + error() { + local FAIL_ON_ERROR=${FAIL_ON_ERROR:-true} + local TYPE=${TYPE:-"FAIL"} local ERRLOG sysctl -w lustre.fail_loc=0 2> /dev/null || true - log "${TESTSUITE} ${TESTNAME}: **** FAIL:" $@ + log "${TESTSUITE} ${TESTNAME}: **** ${TYPE}:" $@ ERRLOG=$TMP/lustre_${TESTSUITE}_${TESTNAME}.$(date +%s) echo "Dumping lctl log to $ERRLOG" # We need to dump the logs on all nodes @@ -1046,12 +1049,19 @@ error() { [ ! "$mds_HOST" = "$(hostname)" ] && do_node $mds_HOST $LCTL dk $ERRLOG [ ! "$ost_HOST" = "$(hostname)" -a ! "$ost_HOST" = "$mds_HOST" ] && do_node $ost_HOST $LCTL dk $ERRLOG debugrestore - [ "$TESTSUITELOG" ] && echo "$0: FAIL: $TESTNAME $@" >> $TESTSUITELOG + [ "$TESTSUITELOG" ] && echo "$0: ${TYPE}: $TESTNAME $@" >> $TESTSUITELOG if $FAIL_ON_ERROR; then exit 1 fi } +# 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" +error_ignore() { + FAIL_ON_ERROR=false TYPE="IGNORE (bz$1)" error $2 +} + skip () { log " SKIP: ${TESTSUITE} ${TESTNAME} $@" [ "$TESTSUITELOG" ] && echo "${TESTSUITE}: SKIP: $TESTNAME $@" >> $TESTSUITELOG