Whamcloud - gitweb
LU-13031 tests: avoid new user xattr in interop 32/52332/4
authorXing Huang <hxing@ddn.com>
Sun, 10 Sep 2023 08:07:16 +0000 (16:07 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Nov 2023 02:08:00 +0000 (02:08 +0000)
The xattr test of test_103a is expecting that there are no other
user xattrs, but the patch(#50982) is adding a new user xattr to
every file.  This new xattr can be disabled when running with new
clients and old servers, but this is not easily possible with old
clients (where the test scripts run) and new servers
(that have that patch #50982).

We can have this change to avoid the above problem.

Test-Parameters: testlist=sanity serverjob=lustre-b_es-reviews serverbuildno=12671 env=ONLY=103
Signed-off-by: Xing Huang <hxing@ddn.com>
Change-Id: Iaf4bd81be7e43d946ec184e7d8d65326983c351d
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52332
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/tests/sanity.sh

index 7b4d43e..55a31ee 100755 (executable)
@@ -11441,6 +11441,13 @@ test_103a() {
                skip_env "could not find setfacl"
        remote_mds_nodsh && skip "remote MDS with nodsh"
 
+       local mdts=$(comma_list $(mdts_nodes))
+       local saved=$(do_facet mds1 $LCTL get_param -n mdt.$FSNAME-MDT0000.job_xattr)
+
+       [[ -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
+
        gpasswd -a daemon bin                           # LU-5641
        do_facet $SINGLEMDS gpasswd -a daemon bin       # LU-5641