Whamcloud - gitweb
b=21558 improve test 21b COS=0 check
authorAlexander.Zarochentev <alexander.zarochentev@sun.com>
Wed, 3 Feb 2010 18:01:03 +0000 (21:01 +0300)
committerRobert Read <rread@sun.com>
Wed, 3 Feb 2010 20:02:44 +0000 (12:02 -0800)
In test 21b, when testing that the dependent renames are not replied if COS=0,
there is still a window when transactions may be written to disk before the
mds device is set R/O. To avoid such a rare test failure, the check is
repeated several times.

i=tappro
i=rober.read

lustre/tests/replay-dual.sh

index f450f70..e6fb1a1 100755 (executable)
@@ -514,8 +514,16 @@ test_21b() {
     COS=0
     do_facet mds$num lctl set_param mdt.*.commit_on_sharing=$COS
 
-    test_21b_sub mds$num && error "Not all renames are replayed. COS=$COS" 
-
+    # there is still a window when transactions may be written to disk before
+    # the mds device is set R/O. To avoid such a rare test failure, the check
+    # is repeated several times.
+    local n_attempts=1
+    while true; do
+    test_21b_sub mds$num || break;
+    let n_attempts=n_attempts+1
+    [ $n_attemtps -gt 3] &&
+        error "The test cannot check whether COS works or not: all renames are replied w/o COS"
+    done
     restore_lustre_params < $param_file
     rm -f $param_file
     return 0