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

lustre/tests/sanity.sh

index 2c27772..2e03a87 100644 (file)
@@ -5769,6 +5769,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
@@ -5779,13 +5780,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" ] || 
@@ -5795,7 +5796,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}')
 
@@ -5804,7 +5805,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