Whamcloud - gitweb
b=17748 fix sanityn test 33 to support multiple OSS nodes
authorJian Yu <Jian.Yu@Sun.COM>
Fri, 3 Sep 2010 14:23:28 +0000 (22:23 +0800)
committerAndrew Perepechko <andrew.perepechko@sun.com>
Mon, 6 Sep 2010 14:18:59 +0000 (18:18 +0400)
i=vitaly.fertman
i=grev

lustre/tests/sanityN.sh

index 922b4ff..5805076 100644 (file)
@@ -698,13 +698,22 @@ test_32b() { # bug 11270
 }
 run_test 32b "lockless i/o"
 
+get_ost_lock_timeouts() {
+    local nodes=${1:-$(comma_list $(osts_nodes))}
+
+    local locks=$(do_nodes $nodes \
+        "lctl get_param -n ldlm.namespaces.filter-*.lock_timeouts" | calc_sum)
+
+    echo $locks
+}
+
 test_33() { #16129
         local OPER
         local lock_in
         local lock_out
         for OPER in notimeout timeout ; do
                 rm $DIR1/$tfile 2>/dev/null
-                lock_in=$(do_nodes $(osts_nodes) "lctl get_param -n ldlm.namespaces.filter-*.lock_timeouts" | calc_sum)
+                lock_in=$(get_ost_lock_timeouts)
                 if [ $OPER == "timeout" ] ; then
                         for j in `seq $OSTCOUNT`; do
                                 #define OBD_FAIL_PTLRPC_HPREQ_TIMEOUT    0x511
@@ -725,7 +734,7 @@ test_33() { #16129
                 dd of=/dev/null if=$DIR2/$tfile > /dev/null 2>&1
                 # wait for a lock timeout
                 sleep 4
-                lock_out=$(do_nodes $(osts_nodes) "lctl get_param -n ldlm.namespaces.filter-*.lock_timeouts" | calc_sum)
+                lock_out=$(get_ost_lock_timeouts)
                 if [ $OPER == "timeout" ] ; then
                         if [ $lock_in == $lock_out ]; then
                                 error "no lock timeout happened"