diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /source3/script/tests/test_offline.sh | |
parent | Initial commit. (diff) | |
download | samba-upstream.tar.xz samba-upstream.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | source3/script/tests/test_offline.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source3/script/tests/test_offline.sh b/source3/script/tests/test_offline.sh new file mode 100755 index 0000000..5e06b1f --- /dev/null +++ b/source3/script/tests/test_offline.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Blackbox test for the offline VFS module. +# +if [ $# -lt 7 ]; then + cat <<EOF +Usage: test_offline SERVER SERVER_IP DOMAIN USERNAME PASSWORD WORKDIR SMBCLIENT +EOF + exit 1 +fi + +SERVER=${1} +SERVER_IP=${2} +DOMAIN=${3} +USERNAME=${4} +PASSWORD=${5} +WORKDIR=${6} +SMBCLIENT=${7} +shift 7 +SMBCLIENT="$VALGRIND ${SMBCLIENT}" +ADDARGS="$*" + +incdir=$(dirname $0)/../../../testprogs/blackbox +. $incdir/subunit.sh + +touch $WORKDIR/foo + +failed=0 + +attribs=$($SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/offline" -I $SERVER_IP -c "allinfo foo" | sed -n 's/^attributes:.*(\([^)]*\)).*/\1/p') +testit "file has offline attribute" test "x$attribs" = "x1000" || failed=$(expr $failed + 1) + +exit $failed |