Whamcloud - gitweb
LU-18102 tests: skip read/write in sanity/27J for some kernels 77/55977/5
authorBobi Jam <bobijam@whamcloud.com>
Fri, 9 Aug 2024 03:56:36 +0000 (11:56 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 8 Sep 2024 16:04:37 +0000 (16:04 +0000)
Kernel commit v5.11-10234-gcbd59c48ae2b (5.12) skips filemap_read()
with 0 file size, commit v6.2-rc4-61-g5956592ce337 (6.2) just correct
the last page read in filemap_read(), it still skips the real file
read with 0 sized file.

Test-Parameters: trivial
Fixes: b711af7d24 ("LU-16101 tests: skip sanity/27J for more kernels")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I1c562cce1374df7659c8d178fb3601e4dfb01744
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55977
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 7852a5f..062fd5e 100755 (executable)
@@ -2876,11 +2876,6 @@ test_27J() {
        (( $MDS1_VERSION > $(version_code 2.12.51) )) ||
                skip "Need MDS version newer than 2.12.51"
 
-       # skip basic ops on file with foreign LOV tests on 5.12-6.2 kernels
-       # until the filemap_read() issue is fixed by v6.2-rc4-61-g5956592ce337
-       (( $LINUX_VERSION_CODE < $(version_code 5.12.0) ||
-          $LINUX_VERSION_CODE >= $(version_code 6.2.0) )) ||
-               skip "Need kernel < 5.12.0 or >= 6.2.0 for filemap_read() fix"
 
        test_mkdir $DIR/$tdir
        local uuid1=$(cat /proc/sys/kernel/random/uuid)
@@ -2949,14 +2944,19 @@ test_27J() {
        $LFS setstripe -c 2 $DIR/$tdir/${tfile}2 &&
                error "$DIR/$tdir/${tfile}2: setstripe should fail"
 
-       # R/W should fail
-       cat $DIR/$tdir/$tfile && error "$DIR/$tdir/$tfile: read should fail"
-       cat $DIR/$tdir/${tfile}2 &&
-               error "$DIR/$tdir/${tfile}2: read should fail"
-       cat /etc/passwd > $DIR/$tdir/$tfile &&
-               error "$DIR/$tdir/$tfile: write should fail"
-       cat /etc/passwd > $DIR/$tdir/${tfile}2 &&
-               error "$DIR/$tdir/${tfile}2: write should fail"
+       # skip basic ops on file with foreign LOV tests on >5.12 kernels
+       (( $LINUX_VERSION_CODE < $(version_code 5.12.0) )) && {
+               # kernel >= 5.12.0 would skip filemap_read() with 0 sized file
+               # R/W should fail
+               cat $DIR/$tdir/$tfile &&
+                       error "$DIR/$tdir/$tfile: read should fail"
+               cat $DIR/$tdir/${tfile}2 &&
+                       error "$DIR/$tdir/${tfile}2: read should fail"
+               cat /etc/passwd > $DIR/$tdir/$tfile &&
+                       error "$DIR/$tdir/$tfile: write should fail"
+               cat /etc/passwd > $DIR/$tdir/${tfile}2 &&
+                       error "$DIR/$tdir/${tfile}2: write should fail"
+       }
 
        # chmod should work
        chmod 222 $DIR/$tdir/$tfile ||