From: Marc Vef Date: Mon, 17 Mar 2025 12:57:08 +0000 (+0100) Subject: LU-18357 test: fix sanity-sec 27a interop with long fileset X-Git-Tag: 2.16.54~53 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3a12de16bf479f056d86d2b11b068978eb3f889a;p=fs%2Flustre-release.git LU-18357 test: fix sanity-sec 27a interop with long fileset The fileset length in sanity-sec 27a was signficantly increased to test multiple fileset fragments on the IAM. This long fileset is also used in interop with "lctl set_param -P" with older servers instead of "lctl nodemap_set_fileset". However, running "lctl get_param" with this long fileset on older servers (<=2.15) causes a line break (due to the output being longer than 80 characters) which results in "wait_nm_sync" to fail when comparing the expected vs. the actual output. This patch modifies sanity-sec test 27a and reverts the fileset to its original much shorter path in the interop case when "lctl set_param -P" must be used. When "lctl nodemap_set_fileset" is used, the long fileset is still set to test multiple fileset fragments. Test-Parameters: trivial testlist=sanity-sec Test-Parameters: trivial testlist=sanity-sec serverversion=2.15 Fixes: da3536da22ab ("LU-18357 ptlrpc: Use nodemap IAM for persisting filesets") Signed-off-by: Marc Vef Change-Id: Ie1d39f3f986675133fd9d4c294e7af186f2ed1b9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58436 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 78152db..75857d0 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -2154,14 +2154,18 @@ nodemap_exercise_fileset() { local check_proj=true local loop=0 local nm="$1" + local subdir="subdir_${nm}" + local subsubdir="subsubdir_${nm}" (( $MDS1_VERSION >= $(version_code 2.14.52) )) || check_proj=false # when "have_persistent_fset_cmd" is true, "lctl nodemap_set_fileset" # is persistent, otherwise "lctl set_param -P" must be used have_persistent_fset_cmd=false - (( $MGS_VERSION >= $(version_code 2.16.51) )) && + if (( $MGS_VERSION >= $(version_code 2.16.51) )); then have_persistent_fset_cmd=true + subdir="thisisaverylongsubdirtotestlongfilesetsandtotestmultiplefilesetfragmentsonthenodemapiam_${nm}" + fi # setup if [[ "$nm" == "default" ]]; then @@ -2334,9 +2338,6 @@ test_27a() { fi for nm in "default" "c0"; do - local subdir="thisisaverylongsubdirtotestlongfilesetsandtotestmultiplefilesetfragmentsonthenodemapiam_${nm}" - local subsubdir="subsubdir_${nm}" - if [[ "$nm" == "default" && "$SHARED_KEY" == "true" ]]; then echo "Skipping nodemap $nm with SHARED_KEY" continue