Whamcloud - gitweb
LU-13031 tests: skip sanity/test_205h,205i in interop 95/52095/2
authorThomas Bertschinger <bertschinger@lanl.gov>
Fri, 25 Aug 2023 16:28:16 +0000 (12:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Sep 2023 06:22:55 +0000 (06:22 +0000)
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 <bertschinger@lanl.gov>
Change-Id: Iaa5d0c1a7f3fa6769fab4340ade315e7a49df009
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52095
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index bbd5a91..099f16e 100755 (executable)
@@ -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)