summaryrefslogtreecommitdiffstats
path: root/source4/torture/gentest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-28 11:48:39 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-28 11:48:39 +1000
commitd5fe193b156dfc8f7d82afbe5ac04f13bff3427b (patch)
treeb45fdb98914c265d69c26103e0aca9ed54364906 /source4/torture/gentest.c
parent6222b8e7e215e1d0d7c82d40d35142b8c96afbf6 (diff)
downloadsamba-d5fe193b156dfc8f7d82afbe5ac04f13bff3427b.tar.gz
samba-d5fe193b156dfc8f7d82afbe5ac04f13bff3427b.tar.xz
samba-d5fe193b156dfc8f7d82afbe5ac04f13bff3427b.zip
added --skip-cleanup to gentest
(This used to be commit 0bc3de0cc4ad8a9d1a8582852f7f42cf56dd5a3e)
Diffstat (limited to 'source4/torture/gentest.c')
-rw-r--r--source4/torture/gentest.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index ae18fe809c9..cc9da417fe1 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -49,6 +49,7 @@ static struct gentest_options {
const char *seeds_file;
int use_preset_seeds;
int fast_reconnect;
+ int skip_cleanup;
} options;
/* mapping between open handles on the server and local handles */
@@ -1865,6 +1866,11 @@ static bool handler_notify(int instance)
static void wipe_files(void)
{
int i;
+
+ if (options.skip_cleanup) {
+ return;
+ }
+
for (i=0;i<NSERVERS;i++) {
int n = smbcli_deltree(servers[i].cli[0]->tree, "\\gentest");
if (n == -1) {
@@ -2196,6 +2202,7 @@ static bool split_unc_name(const char *unc, char **server, char **share)
{"unclist", 0, POPT_ARG_STRING, NULL, OPT_UNCLIST, "unclist", NULL},
{"seedsfile", 0, POPT_ARG_STRING, &options.seeds_file, 0, "seed file", NULL},
{ "user", 'U', POPT_ARG_STRING, NULL, 'U', "Set the network username", "[DOMAIN/]USERNAME[%PASSWORD]" },
+ {"skip-cleanup", 0, POPT_ARG_NONE, &options.skip_cleanup, 0, "don't delete files at start", NULL},
POPT_COMMON_SAMBA
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS