Whamcloud - gitweb
LU-16673 tests: add checking for user USER0 01/50501/2
authorXinliang Liu <xinliang.liu@linaro.org>
Mon, 3 Apr 2023 03:47:23 +0000 (03:47 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Aug 2023 05:36:15 +0000 (05:36 +0000)
Add checking for user USER0 in tests 125, 154a, 154b.

Test-Parameters: trivial testlist=sanity env=ONLY="125 154a 154b"

Change-Id: Id42d4b6dca4c05757d02483ddedd65be55df96d6
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50501
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 8f9f9d6..b345dbc 100755 (executable)
@@ -14242,6 +14242,7 @@ test_125() { # 13358
        $LCTL get_param -n mdc.*-mdc-*.connect_flags | grep -q acl ||
                skip_env "must have acl enabled"
        [ -z "$(which setfacl)" ] && skip_env "must have setfacl tool"
+       id $USER0 || skip_env "missing user $USER0"
 
        test_mkdir $DIR/$tdir
        $LFS setstripe -S 65536 -c -1 $DIR/$tdir || error "setstripe failed"
@@ -16102,6 +16103,7 @@ dot_lustre_fid_permission_check() {
        echo "link fid $fid"
        ln -f $ffid $test_dir/tfile.lnk || error "link $ffid failed."
        if [[ $($LCTL get_param -n mdc.*-mdc-*.connect_flags) =~ acl ]]; then
+               id $USER0 || skip_env "missing user $USER0"
                echo "setfacl fid $fid"
                setfacl -R -m u:$USER0:rwx $ffid ||
                        error "setfacl $ffid failed"