From: Jian Yu Date: Sat, 15 Jul 2023 14:36:13 +0000 (+0800) Subject: LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c788da576e2414920727384e44fdfe1aa3ef86ea;p=fs%2Flustre-release.git LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP 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. Lustre-change: https://review.whamcloud.com/51667 Lustre-commit: a5a9ded43b72238c2df8e0a74f03151ea3d4ce99 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 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51691 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 18d97c5..1dc1b46 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -3578,16 +3578,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 } @@ -3617,7 +3626,8 @@ client_up() { } client_evicted() { - ! client_up $1 + sleep 1 + ! _lfs_df_check $1 } client_reconnect_try() {