Whamcloud - gitweb
LU-3304 tests: sanity-quota test_18 watchdog triggered 10/6310/3
authorJames Nunez <james.a.nunez@intel.com>
Fri, 10 May 2013 14:15:50 +0000 (08:15 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 02:05:47 +0000 (02:05 +0000)
sanity-quota test_18 is picking up watchdog messages from
prevous tests. The fix is clearing dmesg at the beginning
of test_18. This also allowed us to remove some of strings
that the awk command looking for, i.e. the subtest name.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
testlist=sanity-quota

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I9a20bd2e374048f252219038df3590fef339a672
Reviewed-on: http://review.whamcloud.com/6310
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-quota.sh

index 13e5373..a2cef17 100644 (file)
@@ -1707,17 +1707,17 @@ test_18_sub () {
 # test when mds does failover, the ost still could work well
 # this test shouldn't trigger watchdog b=14840
 test_18() {
+       # Clear dmesg so watchdog is not triggered by previous
+       # test output
+       do_facet ost1 dmesg -c > /dev/null
+
        test_18_sub normal
        test_18_sub directio
 
        # check if watchdog is triggered
        do_facet ost1 dmesg > $TMP/lustre-log-${TESTNAME}.log
-       local watchdog=$(awk '/sanity-quota test 18/ {start = 1;}
-                      /Service thread pid/ && /was inactive/ {
-                              if (start) {
-                                      print;
-                              }
-                      }' $TMP/lustre-log-${TESTNAME}.log)
+       local watchdog=$(awk '/Service thread pid/ && /was inactive/ \
+                       { print; }' $TMP/lustre-log-${TESTNAME}.log)
        [ -z "$watchdog" ] || error "$watchdog"
        rm -f $TMP/lustre-log-${TESTNAME}.log
 }