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

lustre/tests/sanity.sh

index f715a71..3e34449 100644 (file)
@@ -6170,6 +6170,7 @@ test_162() {
 run_test 162 "path lookup sanity"
 
 test_170() {
+        $LCTL clear    # bug 18514
         $LCTL debug_daemon start $TMP/${tfile}_log_good
         touch $DIR/$tfile
         $LCTL debug_daemon stop
@@ -6180,13 +6181,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" ] || 
@@ -6196,7 +6197,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}')
 
@@ -6205,7 +6206,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