From 62b470a02347bc7f7510641e36568c5b508a7a87 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Tue, 19 Jul 2022 16:15:42 +0300 Subject: [PATCH] LU-16027 tests: sanity:test_66: specify blocksize explicitly Fix test_66() to be independent from BLOCKSIZE environment variable. To reproduce the failure, just run: llmount.sh export BLOCKSIZE=4096; ONLY=66 sh sanity.sh == sanity test 66: update inode blocks count on client == 8+0 records in 8+0 records out 8192 bytes (8.2 kB, 8.0 KiB) copied, 0.00589935 s, 1.4 MB/s sanity test_66: @@@@@@ FAIL: /mnt/lustre/f66 blocks 2 < 8 Test-Parameters: trivial testlist=sanity env=ONLY=66 Signed-off-by: Elena Gryaznova HPE-bug-id: LUS-11014 Reviewed-by: Vladimir Saveliev Change-Id: I0adca724518cb955e3664d33a36628ae19a1712d Reviewed-on: https://review.whamcloud.com/47983 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Vladimir Saveliev Reviewed-by: Alexander Boyko Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6166cfb..214611e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 ===============" -- 1.8.3.1