Whamcloud - gitweb
b=18514
authorgrev <grev>
Thu, 12 Mar 2009 16:01:29 +0000 (16:01 +0000)
committergrev <grev>
Thu, 12 Mar 2009 16:01:29 +0000 (16:01 +0000)
i=H.Huang
sanity test_170 fix

lustre/tests/sanity.sh

index 562075d..3ce5121 100644 (file)
@@ -5584,6 +5584,7 @@ test_153() {
 run_test 153 "test if fdatasync does not crash ======================="
 
 test_170() {
+        $LCTL clear    # bug 18514
         $LCTL debug_daemon start $TMP/${tfile}_log_good
         touch $DIR/$tfile
         $LCTL debug_daemon stop
@@ -5594,13 +5595,13 @@ test_170() {
         rm -rf $DIR/$tfile
         $LCTL debug_daemon stop
 
-        $LCTL df $TMP/${tfile}_log_bad 2&> $TMP/${tfile}_log_bad.out ||
+        $LCTL df $TMP/${tfile}_log_bad > $TMP/${tfile}_log_bad.out 2>&1 ||
                error "lctl df log_bad failed"
 
         local bad_line=$(tail -n 1 $TMP/${tfile}_log_bad.out | awk '{print $9}')
         local good_line1=$(tail -n 1 $TMP/${tfile}_log_bad.out | awk '{print $5}')
 
-        $LCTL df $TMP/${tfile}_log_good 2&>$TMP/${tfile}_log_good.out 
+        $LCTL df $TMP/${tfile}_log_good > $TMP/${tfile}_log_good.out 2>&1
         local good_line2=$(tail -n 1 $TMP/${tfile}_log_good.out | awk '{print $5}')
 
        [ "$bad_line" ] && [ "$good_line1" ] && [ "$good_line2" ] || 
@@ -5610,7 +5611,7 @@ test_170() {
         cat $TMP/${tfile}_log_bad >> $TMP/${tfile}_logs_corrupt 
         cat $TMP/${tfile}_log_good >> $TMP/${tfile}_logs_corrupt           
 
-        $LCTL df $TMP/${tfile}_logs_corrupt 2&> $TMP/${tfile}_log_bad.out
+        $LCTL df $TMP/${tfile}_logs_corrupt > $TMP/${tfile}_log_bad.out 2>&1
         local bad_line_new=$(tail -n 1 $TMP/${tfile}_log_bad.out | awk '{print $9}')
         local good_line_new=$(tail -n 1 $TMP/${tfile}_log_bad.out | awk '{print $5}')
 
@@ -5619,7 +5620,7 @@ test_170() {
  
         local expected_good=$((good_line1 + good_line2*2))
 
-        rm -rf $TMP/${tfile}*
+        rm -f $TMP/${tfile}*
         if [ $bad_line -ne $bad_line_new ]; then
                 error "expected $bad_line bad lines, but got $bad_line_new"
                 return 1