The Samba-Bugzilla – Attachment 13322 Details for
Bug 12867
The smb tarmode tests kills the share dir contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.6
0001-s3-tests-Do-not-delete-the-contets-of-LOCAL_PATH-wit.patch (text/plain), 3.98 KB, created by
Andreas Schneider
on 2017-06-28 15:34:07 UTC
(
hide
)
Description:
patch for 4.6
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2017-06-28 15:34:07 UTC
Size:
3.98 KB
patch
obsolete
>From 39da5d0cc1153fa08a82b632e67946d54149c779 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Mon, 26 Jun 2017 23:18:30 +0200 >Subject: [PATCH] s3:tests: Do not delete the contets of LOCAL_PATH with > tarmode test > >The test_smbclient_tarmode.pl test operates on $LOCAL_PATH by default >and removes everything. So it deletes all precreated files and >directories which the setup_fileserver() function initially set up. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12867 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >(cherry picked from commit 4f5cfe2713294462b9dc68afbec2ea2c72230885) >--- > selftest/target/Samba3.pm | 3 +++ > source3/script/tests/test_smbclient_tarmode.sh | 10 +++++----- > source3/selftest/tests.py | 4 ++-- > 3 files changed, 10 insertions(+), 7 deletions(-) > >diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm >index a7699f8ccb4..5cdbb9b9867 100755 >--- a/selftest/target/Samba3.pm >+++ b/selftest/target/Samba3.pm >@@ -767,6 +767,9 @@ sub setup_fileserver($$) > my $smbget_sharedir="$share_dir/smbget"; > push(@dirs,$smbget_sharedir); > >+ my $tarmode_sharedir="$share_dir/tarmode"; >+ push(@dirs,$tarmode_sharedir); >+ > my $fileserver_options = " > [lowercase] > path = $lower_case_share_dir >diff --git a/source3/script/tests/test_smbclient_tarmode.sh b/source3/script/tests/test_smbclient_tarmode.sh >index 331ba202199..3779c38a5ca 100755 >--- a/source3/script/tests/test_smbclient_tarmode.sh >+++ b/source3/script/tests/test_smbclient_tarmode.sh >@@ -94,10 +94,10 @@ test_tarmode_creation() { > # Clear temp data > rm -rf -- "$PREFIX"/tarmode > /dev/null 2>&1 > rm -f "$PREFIX"/tarmode.tar > /dev/null 2>&1 >- rm -rf "$LOCAL_PATH"/tarmode > /dev/null 2>&1 >+ rm -rf "$LOCAL_PATH" > /dev/null 2>&1 > > # Build the test data >- if ! create_test_data "$LOCAL_PATH/tarmode"; then >+ if ! create_test_data "$LOCAL_PATH"; then > echo "Test data creation failed" > false > return >@@ -119,7 +119,7 @@ test_tarmode_creation() { > fi > > # Verify data >- if ! validate_data "$PREFIX/tarmode" "$LOCAL_PATH/tarmode"; then >+ if ! validate_data "$PREFIX/tarmode" "$LOCAL_PATH"; then > echo "Data not equivalent" > false > return >@@ -136,7 +136,7 @@ test_tarmode_extraction() { > # Clear temp data > rm -rf -- "$PREFIX"/tarmode > /dev/null 2>&1 > rm -f "$PREFIX"/tarmode.tar > /dev/null 2>&1 >- rm -rf "$LOCAL_PATH"/tarmode > /dev/null 2>&1 >+ rm -rf "$LOCAL_PATH" > /dev/null 2>&1 > > # Build the test data > if ! create_test_data "$PREFIX/tarmode"; then >@@ -161,7 +161,7 @@ test_tarmode_extraction() { > fi > > # Verify data >- if ! validate_data "$PREFIX/tarmode" "$LOCAL_PATH/tarmode"; then >+ if ! validate_data "$PREFIX/tarmode" "$LOCAL_PATH"; then > echo "Data not equivalent" > false > return >diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py >index d3cb071b903..746f3ea0bf6 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -236,13 +236,13 @@ for env in ["fileserver"]: > plantestsuite("samba3.blackbox.smbclient_tarmode (%s)" % env, env, > [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), > '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', >- '$LOCAL_PATH', '$PREFIX', smbclient3, configuration]) >+ '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration]) > > # Test suite for new smbclient/tar with libarchive (GSoC 13) > plantestsuite("samba3.blackbox.smbclient_tar (%s)" % env, env, > [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"), > '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp', >- '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH', >+ '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode', > '-d', '$PREFIX', '-b', smbclient3, > '--subunit', '--', configuration]) > >-- >2.13.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 12867
: 13322