1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s3: tests: smbclient test to ensure we can create and see a :foobar stream on the top level directory in a share.

Regression test for:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11522

Remember to remove the ARCHIVE attribute from the toplevel
share when done (can only be done over SMB2+).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Sep 18 11:00:44 CEST 2015 on sn-devel-104
This commit is contained in:
Jeremy Allison 2015-09-16 16:12:15 -07:00 committed by Ralph Böhme
parent 74fd4f93ef
commit 6ce3643e45

View File

@ -971,6 +971,38 @@ EOF
fi
}
# Test creating a stream on the root of the share directory filname - :foobar
test_toplevel_stream()
{
tmpfile=$PREFIX/smbclient_interactive_prompt_commands
cat > $tmpfile <<EOF
put ${PREFIX}/smbclient_interactive_prompt_commands :foobar
allinfo \\
setmode \\ -a
quit
EOF
cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP -mSMB3 $ADDARGS < $tmpfile 2>&1'
eval echo "$cmd"
out=`eval $cmd`
ret=$?
rm -f $tmpfile
if [ $ret != 0 ] ; then
echo "$out"
echo "failed creating toplevel stream :foobar with error $ret"
false
return
fi
echo "$out" | grep '^stream:.*:foobar'
ret=$?
if [ $ret != 0 ] ; then
echo "$out"
echo "failed creating toplevel stream :foobar"
false
fi
}
LOGDIR_PREFIX=test_smbclient_s3
@ -1059,6 +1091,10 @@ testit "server-side file copy" \
test_scopy || \
failed=`expr $failed + 1`
testit "creating a :stream at root of share" \
test_toplevel_stream || \
failed=`expr $failed + 1`
testit "rm -rf $LOGDIR" \
rm -rf $LOGDIR || \
failed=`expr $failed + 1`