Whamcloud - gitweb
LU-3195 tests: Interop 2.3.0<->2.3.63 sanity-quota test_6
authorJames Nunez <james.a.nunez@intel.com>
Fri, 10 May 2013 14:44:00 +0000 (08:44 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 13 Jun 2013 23:22:45 +0000 (19:22 -0400)
sanity-quota test_6 is picking up watchdog messages from
prevous tests. The fix is clearing dmesg at the beginning
of test_6. This also allowed us to remove some of strings
that the awk command is looking for, i.e. the subtest name.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I39b93916818b64560e82aa01d839d49c994693ce
Reviewed-on: http://review.whamcloud.com/6313
Tested-by: Hudson
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 78b62a9..13e5373 100644 (file)
@@ -860,6 +860,10 @@ run_test 5 "Chown & chgrp successfully even out of block/file quota"
 test_6() {
        local LIMIT=3 # 3M
 
 test_6() {
        local LIMIT=3 # 3M
 
+       # Clear dmesg so watchdog is not triggered by previous
+       # test output
+       do_facet ost1 dmesg -c > /dev/null
+
        setup_quota_test
        trap cleanup_quota_test EXIT
 
        setup_quota_test
        trap cleanup_quota_test EXIT
 
@@ -918,12 +922,8 @@ test_6() {
 
        # no watchdog is triggered
        do_facet ost1 dmesg > $TMP/lustre-log-${TESTNAME}.log
 
        # no watchdog is triggered
        do_facet ost1 dmesg > $TMP/lustre-log-${TESTNAME}.log
-       watchdog=$(awk '/sanity-quota test 6/ {start = 1;}
-                      /Service thread pid/ && /was inactive/ {
-                              if (start) {
-                                      print;
-                              }
-                      }' $TMP/lustre-log-${TESTNAME}.log)
+       watchdog=$(awk '/Service thread pid/ && /was inactive/ \
+                       { print; }' $TMP/lustre-log-${TESTNAME}.log)
        [ -z "$watchdog" ] || error "$watchdog"
 
        rm -f $TMP/lustre-log-${TESTNAME}.log
        [ -z "$watchdog" ] || error "$watchdog"
 
        rm -f $TMP/lustre-log-${TESTNAME}.log