Whamcloud - gitweb
LU-16027 tests: sanity:test_66: specify blocksize explicitly
[fs/lustre-release.git] / lustre / tests / sanity.sh
index 6166cfb..214611e 100755 (executable)
@@ -9629,12 +9629,12 @@ run_test 65n "don't inherit default layout from root for new subdirectories"
 test_66() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run"
 
-       COUNT=${COUNT:-8}
+       local COUNT=${COUNT:-8}
        dd if=/dev/zero of=$DIR/f66 bs=1k count=$COUNT
        sync; sync_all_data; sync; sync_all_data
        cancel_lru_locks osc
-       BLOCKS=`ls -s $DIR/f66 | awk '{ print $1 }'`
-       [ $BLOCKS -ge $COUNT ] || error "$DIR/f66 blocks $BLOCKS < $COUNT"
+       local BLOCKS=$(ls -s --block-size=1k $DIR/f66 | awk '{ print $1 }')
+       (( BLOCKS >= COUNT )) || error "$DIR/f66 blocks $BLOCKS < $COUNT"
 }
 run_test 66 "update inode blocks count on client ==============="