From: Andreas Schneider Date: Fri, 22 Apr 2022 13:34:09 +0000 (+0200) Subject: s3:tests: Reformat test_large_acl.sh X-Git-Tag: talloc-2.3.4~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a0ae9ee7ad3db6d309450c69c8a6a1710a7bc1;p=thirdparty%2Fsamba.git s3:tests: Reformat test_large_acl.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S Reviewed-by: Alexander Bokovoy --- diff --git a/source3/script/tests/test_large_acl.sh b/source3/script/tests/test_large_acl.sh index d18c098b512..b80034a1438 100755 --- a/source3/script/tests/test_large_acl.sh +++ b/source3/script/tests/test_large_acl.sh @@ -4,10 +4,10 @@ # if [ $# -lt 5 ]; then -cat < /dev/null 2>&1 - rm -rf large_acl > /dev/null + touch large_acl + $SMBCLIENT //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD -c 'put large_acl' >/dev/null 2>&1 + rm -rf large_acl >/dev/null } cleanup() { - $SMBCLIENT //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD -c 'rm large_acl' > /dev/null 2>&1 + $SMBCLIENT //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD -c 'rm large_acl' >/dev/null 2>&1 } build_files test_large_acl() { - #An ACL with 200 entries, ~7K - new_acl=$(seq 1001 1200 | sed -r -e '1 i\D:(A;;0x001f01ff;;;WD)' -e 's/(.*)/(A;;0x001f01ff;;;S-1-5-21-11111111-22222222-33333333-\1)/' | tr -d '\n') - $SMBCACLS //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD --sddl -S $new_acl large_acl - actual_acl=$($SMBCACLS //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD --sddl --numeric large_acl 2>/dev/null | sed -rn 's/.*(D:.*)/\1/p' | tr -d '\n') - if [ ! "$new_acl" = "$actual_acl" ] ; then - echo -e "expected:\n$new_acl\nactual:\n$actual_acl\n" - return 1 - fi + #An ACL with 200 entries, ~7K + new_acl=$(seq 1001 1200 | sed -r -e '1 i\D:(A;;0x001f01ff;;;WD)' -e 's/(.*)/(A;;0x001f01ff;;;S-1-5-21-11111111-22222222-33333333-\1)/' | tr -d '\n') + $SMBCACLS //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD --sddl -S $new_acl large_acl + actual_acl=$($SMBCACLS //$SERVER/acl_xattr_ign_sysacl_windows -U $USERNAME%$PASSWORD --sddl --numeric large_acl 2>/dev/null | sed -rn 's/.*(D:.*)/\1/p' | tr -d '\n') + if [ ! "$new_acl" = "$actual_acl" ]; then + echo -e "expected:\n$new_acl\nactual:\n$actual_acl\n" + return 1 + fi } failed=0 -testit "able to retrieve a large ACL if VFS supports it" test_large_acl || failed=`expr $failed + 1` +testit "able to retrieve a large ACL if VFS supports it" test_large_acl || failed=$(expr $failed + 1) cleanup