[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Sat Apr 8 10:30:02 UTC 2017
The branch, master has been updated
via a9bd9a1 s3:tests: Create a test directory for a clean test
from 5b4a1b6 docs: fixup smbclient rename -f option
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a9bd9a143e6f76dcef011399433b7b779f1ed2e5
Author: Andreas Schneider <asn at samba.org>
Date: Tue Apr 4 11:07:36 2017 +0200
s3:tests: Create a test directory for a clean test
The test fails on openSUSE Tumbleweed with:
NT_STATUS_FILE_IS_A_DIRECTORY opening remote file \foo\bar\testfile
This cleans up the code to create a directory 'test' which can be
completely removed so nothing will stay behind. It also makes sure that
all parent directories are created and the files have some content.
https://bugzilla.samba.org/show_bug.cgi?id=12721
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Sat Apr 8 12:29:19 CEST 2017 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
source3/script/tests/test_smbclient_s3.sh | 35 ++++++++++++++-----------------
1 file changed, 16 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 9bff883..a7bffcb 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -1100,29 +1100,26 @@ EOF
test_nosymlinks()
{
# Setup test dirs.
- slink_name="$LOCAL_PATH/nosymlinks/source"
- slink_target="$LOCAL_PATH/nosymlinks/target"
- mkdir_target="$LOCAL_PATH/nosymlinks/a"
- dir1="$LOCAL_PATH/nosymlinks/foo"
- dir2="$LOCAL_PATH/nosymlinks/foo/bar"
- get_target="$LOCAL_PATH/nosymlinks/foo/bar/testfile"
-
- rm -f $slink_target
- rm -f $slink_name
- rm -rf $mkdir_target
- rm -rf $dir1
+ test_dir="$LOCAL_PATH/nosymlinks/test"
- touch $slink_target
+ slink_name="$test_dir/source"
+ slink_target="$test_dir/target"
+ foobar_dir="$test_dir/foo/bar"
+ get_target="$test_dir/foo/bar/testfile"
+
+ rm -rf $test_dir
+
+ mkdir -p $test_dir
+ echo "$slink_target" > $slink_target
ln -s $slink_target $slink_name
- mkdir $dir1
- mkdir $dir2
- touch $get_target
+ mkdir -p $foobar_dir
+ echo "$get_target" > $get_target
# Getting a file through a symlink name should fail.
tmpfile=$PREFIX/smbclient_interactive_prompt_commands
cat > $tmpfile <<EOF
-get source
+get test\\source
quit
EOF
cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/nosymlinks -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
@@ -1149,8 +1146,8 @@ EOF
# But we should be able to create and delete directories.
cat > $tmpfile <<EOF
-mkdir a
-mkdir a\\b
+mkdir test\\a
+mkdir test\\a\\b
quit
EOF
cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/nosymlinks -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
@@ -1176,7 +1173,7 @@ EOF
# Ensure regular file/directory access also works.
cat > $tmpfile <<EOF
-cd foo\\bar
+cd test\\foo\\bar
ls
get testfile -
quit
--
Samba Shared Repository
More information about the samba-cvs
mailing list