Whamcloud - gitweb
LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP 67/51667/3
authorJian Yu <yujian@whamcloud.com>
Fri, 14 Jul 2023 03:31:21 +0000 (11:31 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jul 2023 16:46:30 +0000 (16:46 +0000)
After RHEL 9.x or Ubuntu 22.04 client is evicted, "lfs df" returns
error code 95 (EOPNOTSUPP), which is ignored in check_lfs_df_ret_val()
and then causes client_evicted() to ingore that error.

This patch fixes client_evicted() to check the return value
from "lfs df" directly so as not to ignore EOPNOTSUPP.

Test-Parameters: trivial clientdistro=el9.2 testlist=replay-vbr
Test-Parameters: trivial clientdistro=el8.8 testlist=replay-vbr
Test-Parameters: trivial clientdistro=ubuntu2204 testlist=replay-vbr

Change-Id: I633ae8769fc563b8068f433e2afae29463ac5553
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51667
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index 9a9a681..2e937e7 100755 (executable)
@@ -3634,16 +3634,25 @@ wait_remote_prog () {
        return $rc
 }
 
-lfs_df_check() {
+_lfs_df_check() {
        local clients=${1:-$CLIENTS}
        local rc=0
 
-       if [ -z "$clients" ]; then
+       if [[ -z "$clients" ]]; then
                $LFS df $MOUNT > /dev/null || rc=$?
        else
                $PDSH $clients "$LFS df $MOUNT" > /dev/null || rc=$?
        fi
 
+       return $rc
+}
+
+lfs_df_check() {
+       local clients=${1:-$CLIENTS}
+       local rc=0
+
+       _lfs_df_check "$clients" || rc=$?
+
        check_lfs_df_ret_val $rc
 }
 
@@ -3675,7 +3684,8 @@ client_up() {
 }
 
 client_evicted() {
-    ! client_up $1
+       sleep 1
+       ! _lfs_df_check $1
 }
 
 client_reconnect_try() {