Whamcloud - gitweb
LU-11787 test: Fix checkfilemap tests for 64K page 29/45629/11
authorJames Simmons <jsimmons@infradead.org>
Mon, 31 Jan 2022 17:44:46 +0000 (12:44 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 05:32:15 +0000 (05:32 +0000)
File mapping is page size aligned. Modify the tests to handle 64K
page.

Test-Parameters: trivial clientdistro=el8.5 clientarch=aarch64 testlist=sanityn env=ONLY="71a 71b"
Test-Parameters: trivial clientdistro=el8.5 clientarch=ppc64le testlist=sanityn env=ONLY="71a 71b"
Change-Id: I316a197db8cdd0f9064431f8c572b43adf6110b8
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/45629
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanityn.sh

index 27686ee..197ac87 100755 (executable)
@@ -22,12 +22,6 @@ ALWAYS_EXCEPT="$SANITYN_EXCEPT "
 ALWAYS_EXCEPT+="                28      16f"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-# skip tests for PPC until they are fixed
-if [[ $(uname -m) = ppc64 ]]; then
-       # bug number:    LU-11787
-       ALWAYS_EXCEPT+=" 71a"
-fi
-
 if [ $mds1_FSTYPE = "zfs" ]; then
        # bug number:    LU-15757 (test_102() causes crash in umount later)
        ALWAYS_EXCEPT+=" 102"
@@ -3507,28 +3501,28 @@ test_71a() {
        checkfiemap --test ||
                skip "checkfiemap not runnable: $?"
        # write data this way: hole - data - hole - data
-       dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=1 count=1
+       dd if=/dev/urandom of=$DIR1/$tfile bs=64K seek=1 count=1
        [ "$(facet_fstype ost$(($($LFS getstripe -i $DIR1/$tfile) + 1)))" = \
                "zfs" ] &&
                skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return 0
-       dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=3 count=1
+       dd if=/dev/urandom of=$DIR1/$tfile bs=64K seek=3 count=1
        GET_STAT="lctl get_param -n ldlm.services.ldlm_cbd.stats"
        stat $DIR2/$tfile
        local can1=$($GET_STAT | awk '/ldlm_bl_callback/ {print $2}')
        echo $can1
-       checkfiemap $DIR2/$tfile 81920 ||
+       checkfiemap $DIR2/$tfile 131072 ||
                error "data is not flushed from client"
        local can2=$($GET_STAT | awk '/ldlm_bl_callback/ {print $2}')
        echo $can2
 
        # common case of "create file, copy file" on a single node
        # should not flush data from ost
-       dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=1 count=1
-       dd if=/dev/urandom of=$DIR1/$tfile bs=40K seek=3 count=1
+       dd if=/dev/urandom of=$DIR1/$tfile bs=64K seek=1 count=1
+       dd if=/dev/urandom of=$DIR1/$tfile bs=64K seek=3 count=1
        stat $DIR1/$tfile
        local can3=$($GET_STAT | awk '/ldlm_bl_callback/ {print $2}')
        echo $can3
-       checkfiemap $DIR1/$tfile 81920 ||
+       checkfiemap $DIR1/$tfile 131072 ||
        error 4
        local can4=$($GET_STAT | awk '/ldlm_bl_callback/ {print $2}')
        echo $can2
@@ -3552,11 +3546,11 @@ test_71b() {
        mkdir -p $DIR1/$tdir
 
        $LFS setstripe -c -1 $DIR1/$tdir || error "setstripe failed"
-       dd if=/dev/urandom of=$DIR1/$tdir/$tfile bs=40K count=1
+       dd if=/dev/urandom of=$DIR1/$tdir/$tfile bs=64K count=1
        [ "$(facet_fstype ost$(($($LFS getstripe -i $DIR1/$tdir/$tfile) + 1)))" = \
                "zfs" ] &&
                skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return 0
-       checkfiemap $DIR1/$tdir/$tfile 40960 || error "checkfiemap failed"
+       checkfiemap $DIR1/$tdir/$tfile 65536 || error "checkfiemap failed"
 }
 run_test 71b "check fiemap support for stripecount > 1"