Whamcloud - gitweb
LU-13546 pcc: exclude mmap_sanity tst8/tst9 from test list 98/38598/3
authorQian Yingjin <qian@ddn.com>
Thu, 14 May 2020 10:16:48 +0000 (18:16 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 2 Jun 2020 04:28:02 +0000 (04:28 +0000)
Current RHEL8 kernel does not strictly obey POSIX syntax for
mmap() within the maping but beyond current end of the underlying
files: It does not send SIGBUS signals to the process.

For negative file offset, sanity_mmap also failed on 48 bits
ldiksfs backend on the new RHEL kernel due to too large offset:
"Value too large for defined data type".

Due to the above reasons, mmap_sanity tst8/tst9 both failed on the
new RHEL8 kernel. Thus, we execlude mmap_sanity tst8 and tst9 from
sanity-pcc and sanity test list.

Test-Parameters: trivial clientdistro=el8 testlist=sanity-pcc,sanityn
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I6252852fac08fea609444613c59ae138891d8fb8
Reviewed-on: https://review.whamcloud.com/38598
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-pcc.sh
lustre/tests/sanityn.sh

index 093554a..a03f0fa 100644 (file)
@@ -681,6 +681,7 @@ test_4() {
        local loopfile="$TMP/$tfile"
        local mntpt="/mnt/pcc.$tdir"
        local hsm_root="$mntpt/$tdir"
        local loopfile="$TMP/$tfile"
        local mntpt="/mnt/pcc.$tdir"
        local hsm_root="$mntpt/$tdir"
+       local excepts="-e 6 -e 7 -e 8 -e 9"
 
        ! is_project_quota_supported &&
                skip "project quota is not supported" && return
 
        ! is_project_quota_supported &&
                skip "project quota is not supported" && return
@@ -694,16 +695,26 @@ test_4() {
        lfs project -sp $project_id $DIR/$tdir ||
                error "lfs project -sp $project_id $DIR/$tdir failed"
 
        lfs project -sp $project_id $DIR/$tdir ||
                error "lfs project -sp $project_id $DIR/$tdir failed"
 
-       # mmap_sanity tst7 failed on the local ext4 filesystem.
-       # It seems that Lustre filesystem does special process for tst 7.
-       # Thus, we exclude tst7 from the PCC testing.
-       # There is a mmap problem for PCC when multiple clients read/write
-       # on a shared mmapped file. Thus, we exclude mmap_sanity tst6 from
-       # the PCC tesing.
-       $LUSTRE/tests/mmap_sanity -d $DIR/$tdir -m $DIR2/$tdir -e 6 -e 7 ||
+       # 1. mmap_sanity tst7 failed on the local ext4 filesystem.
+       #    It seems that Lustre filesystem does special process for tst 7.
+       # 2. There is a mmap problem for PCC when multiple clients read/write
+       #    on a shared mmapped file for mmap_sanity tst 6.
+       # 3. Current CentOS8 kernel does not strictly obey POSIX syntax for
+       #    mmap() within the maping but beyond current end of the underlying
+       #    files: It does not send SIGBUS signals to the process.
+       # 4. For negative file offset, sanity_mmap also failed on 48 bits
+       #    ldiksfs backend due to too large offset: "Value too large for
+       #    defined data type".
+       # mmap_sanity tst7/tst8/tst9 all failed on Lustre and local ext4.
+       # Thus, we exclude sanity tst6/tst7/tst8/tst9 from the PCC testing.
+       $LUSTRE/tests/mmap_sanity -d $DIR/$tdir -m $DIR2/$tdir $excepts ||
                error "mmap_sanity test failed"
        sync; sleep 1; sync
 
                error "mmap_sanity test failed"
        sync; sleep 1; sync
 
+       # Revoke the layout lock, the PCC-cached file will be
+       # detached automatically.
+       do_facet $SINGLEAGT $LCTL \
+               set_param ldlm.namespaces.*mdc*.lru_size=clear
        rm -rf $DIR/$tdir || error "failed to remove $DIR/$tdir"
 }
 run_test 4 "Auto cache test for mmap"
        rm -rf $DIR/$tdir || error "failed to remove $DIR/$tdir"
 }
 run_test 4 "Auto cache test for mmap"
index 07932e5..526c8da 100755 (executable)
@@ -550,7 +550,9 @@ test_18() {
                 excepts="$excepts -e $(($(printf %d \'$idx)-96))"
         done
 
                 excepts="$excepts -e $(($(printf %d \'$idx)-96))"
         done
 
-       $LUSTRE/tests/mmap_sanity -d $MOUNT1 -m $MOUNT2 $excepts
+       excepts="$excepts -e 7 -e 8 -e 9"
+       $LUSTRE/tests/mmap_sanity -d $MOUNT1 -m $MOUNT2 $excepts ||
+               error "mmap_sanity test failed"
        sync; sleep 1; sync
 }
 run_test 18 "mmap sanity check ================================="
        sync; sleep 1; sync
 }
 run_test 18 "mmap sanity check ================================="