diff options
| author | Jeremy Allison <jra@samba.org> | 2015-09-16 16:12:15 -0700 |
|---|---|---|
| committer | Ralph Böhme <slow@samba.org> | 2015-09-18 11:00:44 +0200 |
| commit | 6ce3643e45bac6660ae69123738c4b39d7bc1864 (patch) | |
| tree | 1e2419d2d9712da5a5fdc18918636b2449121e81 /source3/script | |
| parent | 74fd4f93efe92516fc507edf71a588660782879e (diff) | |
| download | samba-6ce3643e45bac6660ae69123738c4b39d7bc1864.tar.gz samba-6ce3643e45bac6660ae69123738c4b39d7bc1864.tar.bz2 samba-6ce3643e45bac6660ae69123738c4b39d7bc1864.zip | |
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
Diffstat (limited to 'source3/script')
| -rwxr-xr-x | source3/script/tests/test_smbclient_s3.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 69c7452c1f5..c073b43de60 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -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` |
