From: Andreas Dilger Date: Sat, 10 Jun 2023 13:36:38 +0000 (-0600) Subject: LU-16521 tests: racer should work without DNE X-Git-Tag: 2.15.58~123 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c6e65ef62fd6c5519e0e7c9fd7240e92a7b064f2;p=fs%2Flustre-release.git LU-16521 tests: racer should work without DNE Don't assume there are multiple MDTs for the target directory when running dir_migrate and dir_remote. If only one MDT (or none, if running on a non-Lustre directory for some reason), just exit from these workloads instead of spewing errors. Test-parameters: trivial testlist=sanityn Signed-off-by: Andreas Dilger Change-Id: I47cbe9de2c4f9afd79228b6a505dde023f2540e5 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51267 Tested-by: Maloo Tested-by: jenkins Reviewed-by: Alex Deiter Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/racer/dir_migrate.sh b/lustre/tests/racer/dir_migrate.sh index 9c21146..761dee7 100755 --- a/lustre/tests/racer/dir_migrate.sh +++ b/lustre/tests/racer/dir_migrate.sh @@ -5,7 +5,7 @@ DIR=$1 MAX=$2 MDTCOUNT=${MDSCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c MDT)} -while /bin/true ; do +while (( MDTCOUNT > 1 )) ; do migrate_dir=$((RANDOM % MAX)) file=$((RANDOM % MAX)) mdt_idx=$((RANDOM % MDTCOUNT)) diff --git a/lustre/tests/racer/dir_remote.sh b/lustre/tests/racer/dir_remote.sh index 5e6f197..d815ec8 100755 --- a/lustre/tests/racer/dir_remote.sh +++ b/lustre/tests/racer/dir_remote.sh @@ -5,7 +5,7 @@ DIR=$1 MAX=$2 MDTCOUNT=${MDSCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c MDT)} -while /bin/true ; do +while (( MDTCOUNT > 1 )) ; do remote_dir=$((RANDOM % MAX)) file=$((RANDOM % MAX)) mdt_idx=$((RANDOM % MDTCOUNT))