Whamcloud - gitweb
LU-17712 tests: allow multiop to return 0 in recovery-small/157 84/56884/2
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 5 Nov 2024 00:42:38 +0000 (16:42 -0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 8 Nov 2024 20:44:31 +0000 (20:44 +0000)
This patch allows multiop to return 0 in recovery-small/157,
which is conserdered as success because the mmaped I/O
did not hang after the client was evicted.

The patch also skips recovery-small/157 for older MDS since
the test depends on changes made to the MDS code on the server.

Test-Parameters: trivial testlist=recovery-small serverversion=2.15.5

Fixes: 71f8e5d650 ("LU-14708 ptlrpc: skip unnecessary client eviction")
Change-Id: I19d0362ffbccb44c81ec2e09d9b4eccba40b9dcf
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56884
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/recovery-small.sh

index 2308016..882935a 100755 (executable)
@@ -3651,6 +3651,9 @@ run_test 156 "tot_granted miscount after client eviction"
 
 test_157()
 {
+       (( MDS1_VERSION >= $(version_code 2.15.58.110) )) ||
+               skip "need MDS >= v2_15_58-110-g71f8e5d6506f to avoid eviction"
+
        $LFS setstripe -i 0 -c 1 $DIR/$tfile || error "setstripe failed"
        dd if=/dev/zero of=$DIR/$tfile bs=4096 count=1
        cancel_lru_locks osc
@@ -3662,7 +3665,9 @@ test_157()
        sleep 1
        ost_evict_client
        wait $MULTIPID
-       [[ $? == 135 ]] || error "multiop failed with not SIGBUS"
+       local rc=$?
+       (( rc == 0 || rc == 135 )) ||
+               error "multiop failed with $rc, not SIGBUS (135)"
 }
 run_test 157 "eviction during mmaped i/o"