From: Sebastien Buisson Date: Wed, 6 Jan 2021 10:13:56 +0000 (+0100) Subject: LU-14298 tests: fix sanity-sec test_44 for aarch64 client X-Git-Tag: 2.14.0-RC1~33 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=088af126fdfee7d41974c7572c951c2bcb818719 LU-14298 tests: fix sanity-sec test_44 for aarch64 client PAGE_SIZE on aarch64 client is 64KB instead of 4KB, so sizes of IOs performed in sanity-sec test_44 must be adapted. Test-Parameters: testgroup=review-ldiskfs-arm env=ONLY=44 clientdistro=el8.3 serverdistro=el8.3 Signed-off-by: Sebastien Buisson Change-Id: I3764a75f6df871d71d751764627ed618bedf8e0b Reviewed-on: https://review.whamcloud.com/41146 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Tested-by: Andreas Dilger --- diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 8b0900c..31a2f09 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -3199,6 +3199,7 @@ test_44() { local testfile=$DIR/$tdir/$tfile local tmpfile=$TMP/abc local resfile=$TMP/resfile + local pagesz=$(getconf PAGESIZE) local respage $LCTL get_param mdc.*.import | grep -q client_encryption || @@ -3215,8 +3216,8 @@ test_44() { setup_for_enc_tests $LFS setstripe -c1 -i0 $testfile - dd if=/dev/urandom of=$tmpfile bs=8192 count=1 conv=fsync - dd if=$tmpfile of=$testfile bs=8192 count=1 oflag=direct || + dd if=/dev/urandom of=$tmpfile bs=$pagesz count=2 conv=fsync + dd if=$tmpfile of=$testfile bs=$pagesz count=2 oflag=direct || error "could not write to file with O_DIRECT (1)" respage=$(vmtouch $testfile | awk '/Resident\ Pages:/ {print $3}') @@ -3225,7 +3226,7 @@ test_44() { cancel_lru_locks - dd if=$testfile of=$resfile bs=8192 count=1 iflag=direct || + dd if=$testfile of=$resfile bs=$pagesz count=2 iflag=direct || error "could not read from file with O_DIRECT (1)" respage=$(vmtouch $testfile | awk '/Resident\ Pages:/ {print $3}') @@ -3237,13 +3238,13 @@ test_44() { rm -f $resfile - $TRUNCATE $tmpfile 4096 - dd if=$tmpfile of=$testfile bs=4096 count=1 seek=13 oflag=direct || + $TRUNCATE $tmpfile $pagesz + dd if=$tmpfile of=$testfile bs=$pagesz count=1 seek=13 oflag=direct || error "could not write to file with O_DIRECT (2)" cancel_lru_locks - dd if=$testfile of=$resfile bs=4096 count=1 skip=13 iflag=direct || + dd if=$testfile of=$resfile bs=$pagesz count=1 skip=13 iflag=direct || error "could not read from file with O_DIRECT (2)" cmp -bl $tmpfile $resfile || error "file $testfile is corrupted (2)" @@ -3251,12 +3252,12 @@ test_44() { rm -f $testfile $resfile $LFS setstripe -c1 -i0 $testfile - $TRUNCATE $tmpfile 2043 + $TRUNCATE $tmpfile $((pagesz/2 - 5)) cp $tmpfile $testfile cancel_lru_locks - dd if=$testfile of=$resfile bs=4096 count=1 iflag=direct || + dd if=$testfile of=$resfile bs=$pagesz count=1 iflag=direct || error "could not read from file with O_DIRECT (3)" cmp -bl $tmpfile $resfile || error "file $testfile is corrupted (3)"