From: Andreas Schneider Date: Fri, 22 Apr 2022 13:34:10 +0000 (+0200) Subject: s3:tests: Reformat test_netfileenum.sh X-Git-Tag: talloc-2.3.4~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae8f5dec1fa2633763e75b1204e2f239a6c833d7;p=thirdparty%2Fsamba.git s3:tests: Reformat test_netfileenum.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- diff --git a/source3/script/tests/test_netfileenum.sh b/source3/script/tests/test_netfileenum.sh index ab0eb925dbb..3afc74b210c 100755 --- a/source3/script/tests/test_netfileenum.sh +++ b/source3/script/tests/test_netfileenum.sh @@ -5,16 +5,21 @@ # Copyright (C) 2020 Volker Lendecke if [ $# -lt 5 ]; then - echo Usage: $0 \ - SMBCLIENT RPCCLIENT NET SERVER SHARE -exit 1 + echo Usage: $0 \ + SMBCLIENT RPCCLIENT NET SERVER SHARE + exit 1 fi -SMBCLIENT="$1"; shift 1 -RPCCLIENT="$1"; shift 1 -NET="$1"; shift 1 -SERVER="$1"; shift 1 -SHARE="$1"; shift 1 +SMBCLIENT="$1" +shift 1 +RPCCLIENT="$1" +shift 1 +NET="$1" +shift 1 +SERVER="$1" +shift 1 +SHARE="$1" +shift 1 # Do not let deprecated option warnings muck this up SAMBA_DEPRECATED_SUPPRESS=1 @@ -30,10 +35,11 @@ cd $SELFTEST_TMPDIR || exit 1 rm -f smbclient-stdin smbclient-stdout smbclient-stderr mkfifo smbclient-stdin smbclient-stdout smbclient-stderr -CLI_FORCE_INTERACTIVE=1; export CLI_FORCE_INTERACTIVE +CLI_FORCE_INTERACTIVE=1 +export CLI_FORCE_INTERACTIVE ${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \ - < smbclient-stdin > smbclient-stdout 2>smbclient-stderr & + smbclient-stdout 2>smbclient-stderr & CLIENT_PID=$! sleep 1 @@ -50,29 +56,29 @@ printf "open %s\\n" "$FILE" >&100 sleep 1 testit "Create builtin\\administrators group" \ - "${NET}" groupmap add \ - sid=S-1-5-32-544 unixgroup="${USER}"-group type=builtin || \ - failed=$((failed+1)) + "${NET}" groupmap add \ + sid=S-1-5-32-544 unixgroup="${USER}"-group type=builtin || + failed=$((failed + 1)) testit "Add ${USER} to builtin\\administrators" \ - "${NET}" groupmap addmem S-1-5-32-544 \ - $("${NET}" lookup name "${USER}" | cut -d' ' -f1) || \ - failed=$((failed+1)) + "${NET}" groupmap addmem S-1-5-32-544 \ + $("${NET}" lookup name "${USER}" | cut -d' ' -f1) || + failed=$((failed + 1)) "${RPCCLIENT}" "${SERVER}" -U"${USER}"%"${PASSWORD}" -c netfileenum | - grep "$FILE"\$ + grep "$FILE"\$ RC=$? -testit "netfileenum" test $RC = 0 || failed=$((failed+1)) +testit "netfileenum" test $RC = 0 || failed=$((failed + 1)) kill ${CLIENT_PID} rm -f smbclient-stdin smbclient-stdout smbclient-stderr testit "Remove ${USER} from builtin\\administrators" \ - "${NET}" groupmap delmem S-1-5-32-544 \ - $("${NET}" lookup name "${USER}" | cut -d' ' -f1) || \ - failed=$((failed+1)) + "${NET}" groupmap delmem S-1-5-32-544 \ + $("${NET}" lookup name "${USER}" | cut -d' ' -f1) || + failed=$((failed + 1)) testit "Remove builtin\\administrators group" \ - "${NET}" groupmap delete \ - sid=S-1-5-32-544 || \ - failed=$((failed+1)) + "${NET}" groupmap delete \ + sid=S-1-5-32-544 || + failed=$((failed + 1)) testok $0 $failed