From a6df532162556028c2ab9b974989fc0cca68d4fe Mon Sep 17 00:00:00 2001 From: Thomas Bertschinger Date: Fri, 25 Aug 2023 12:28:16 -0400 Subject: [PATCH] LU-13031 tests: skip sanity/test_205h,205i in interop Skip sanity tests 205h and 205i when the MDS version is too old to have the jobid xattr changes. Fix test 103a to not try to set the job_xattr parameter when it does not exist. Fixes: 23a2db28dcf1 ("LU-13031 jobstats: store jobid in xattr when files are created") Test-Parameters: trivial testlist=sanity env=ONLY="103a 205h 205i" Signed-off-by: Thomas Bertschinger Change-Id: Iaa5d0c1a7f3fa6769fab4340ade315e7a49df009 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52095 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index bbd5a91..099f16e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12343,8 +12343,9 @@ test_103a() { local mdts=$(comma_list $(mdts_nodes)) local saved=$(do_facet mds1 $LCTL get_param -n mdt.$FSNAME-MDT0000.job_xattr) - do_nodes $mdts $LCTL set_param mdt.*.job_xattr=NONE - stack_trap "do_nodes $mdts $LCTL set_param mdt.*.job_xattr=$saved" EXIT + [[ -z "$saved" ]] || do_nodes $mdts $LCTL set_param mdt.*.job_xattr=NONE + stack_trap "[[ -z \"$saved\" ]] || \ + do_nodes $mdts $LCTL set_param mdt.*.job_xattr=$saved" EXIT ACLBIN=${ACLBIN:-"bin"} ACLDMN=${ACLDMN:-"daemon"} @@ -20238,6 +20239,8 @@ test_205g() { run_test 205g "stress test for job_stats procfile" test_205h() { + (( $MDS1_VERSION >= $(version_code 2.15.57.7) )) || + skip "Need MDS >= v2_15_57-7-g23a2db28dc for jobid xattr" which getfattr > /dev/null 2>&1 || skip_env "no getfattr command" local dir=$DIR/$tdir @@ -20290,6 +20293,9 @@ test_205h() { run_test 205h "check jobid xattr is stored correctly" test_205i() { + (( $MDS1_VERSION >= $(version_code 2.15.57.7) )) || + skip "Need MDS >= v2_15_57-7-g23a2db28dc for jobid xattr" + local mdts=$(comma_list $(mdts_nodes)) local mds_saved=$(do_facet mds1 $LCTL get_param -n mdt.$FSNAME-MDT0000.job_xattr) -- 1.8.3.1