Whamcloud - gitweb
b=13726
authorgrev <grev>
Thu, 14 Feb 2008 00:48:04 +0000 (00:48 +0000)
committergrev <grev>
Thu, 14 Feb 2008 00:48:04 +0000 (00:48 +0000)
i=Adilger

fix locale for tests where exact output is required

lustre/tests/recovery-small.sh
lustre/tests/sanity.sh

index 2db107c..1489421 100755 (executable)
@@ -864,12 +864,12 @@ test_59() { # bug 10589
        zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
 #define OBD_FAIL_LDLM_CANCEL_EVICT_RACE  0x311
        sysctl -w lustre.fail_loc=0x311
-       writes=`dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1 | awk 'BEGIN { FS="+" } /out/ {print $1}'`
+       writes=$(LANG=C dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1 | awk  -F '+' '/out/ {print $1}')
        sysctl -w lustre.fail_loc=0
        sync
        zconf_umount `hostname` $DIR2 -f
-       reads=`dd if=$DIR/$tfile of=/dev/null 2>&1 | awk 'BEGIN { FS="+" } /in/ {print $1}'`
-       [ $reads -eq $writes ] || error "read" $reads "blocks, must be" $writes
+       reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in/ {print $1}')
+       [ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
 }
 run_test 59 "Read cancel race on client eviction"
 
index 78ebb54..805f379 100644 (file)
@@ -4731,11 +4731,11 @@ run_test 120g "Early Lock Cancel: performance test"
 
 test_121() { #bug #10589
        rm -rf $DIR/$tfile
-       writes=`dd if=/dev/zero of=$DIR/$tfile count=1 2>&1 | awk 'BEGIN { FS="+" } /out/ {print $1}'`
+       writes=$(LANG=C dd if=/dev/zero of=$DIR/$tfile count=1 2>&1 | awk -F '+' '/out/ {print $1}')
 #define OBD_FAIL_LDLM_CANCEL_RACE        0x310
        sysctl -w lustre.fail_loc=0x310
        cancel_lru_locks osc > /dev/null
-       reads=`dd if=$DIR/$tfile of=/dev/null 2>&1 | awk 'BEGIN { FS="+" } /in/ {print $1}'`
+       reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in/ {print $1}')
        sysctl -w lustre.fail_loc=0
        [ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
 }