From: Jian Yu Date: Fri, 14 Jul 2023 03:31:21 +0000 (+0800) Subject: LU-16916 tests: fix client_evicted() not to ignore EOPNOTSUPP X-Git-Tag: 2.15.57~30 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F51667%2F3;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. 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/fs/lustre-release/+/51667 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 9a9a681..2e937e7 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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() {