summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-29 18:00:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:31 -0500
commit60a1046c5c5783799bd64fe18e03534670f83d82 (patch)
tree48f788a6a6fbed5af0a3f3eea1e4373d70b03e5b /source4/torture/raw
parent98038f71a7b072912c974d131012335ca22c5259 (diff)
downloadsamba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.gz
samba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.bz2
samba-60a1046c5c5783799bd64fe18e03534670f83d82.zip
r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/composite.c20
-rw-r--r--source4/torture/raw/context.c12
-rw-r--r--source4/torture/raw/eas.c8
-rw-r--r--source4/torture/raw/lock.c4
-rw-r--r--source4/torture/raw/lockbench.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/notify.c2
-rw-r--r--source4/torture/raw/open.c8
-rwxr-xr-xsource4/torture/raw/pingpong.c10
-rw-r--r--source4/torture/raw/read.c6
-rw-r--r--source4/torture/raw/unlink.c10
11 files changed, 42 insertions, 42 deletions
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index ab406f8624..d713ff321e 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -87,7 +87,7 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("waiting for completion\n");
while (*count != num_ops) {
event_loop_once(cli->transport->socket->event.ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -152,10 +152,10 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- io2.in.dest_host = lp_parm_string(NULL, "torture", "host");
+ io2.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
io2.in.port = 0;
- io2.in.called_name = lp_parm_string(NULL, "torture", "host");
- io2.in.service = lp_parm_string(NULL, "torture", "share");
+ io2.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ io2.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
io2.in.service_type = "A:";
io2.in.credentials = cmdline_credentials;
@@ -177,7 +177,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
while (*count != torture_numops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -297,7 +297,7 @@ static BOOL test_appendacl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("waiting for completion\n");
while (*count != num_ops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -340,10 +340,10 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
int *count = talloc_zero(mem_ctx, int);
BOOL ret = True;
- io1.in.dest_host = lp_parm_string(NULL, "torture", "host");
+ io1.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
io1.in.port = 0;
- io1.in.called_name = lp_parm_string(NULL, "torture", "host");
- io1.in.service = lp_parm_string(NULL, "torture", "share");
+ io1.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ io1.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
io1.in.service_type = "A:";
io1.in.credentials = cmdline_credentials;
io1.in.workgroup = lp_workgroup(global_loadparm);
@@ -364,7 +364,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
while (*count < torture_numops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index af3c56fb27..8c1c14d783 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -277,8 +277,8 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create a second tree context on the same session\n");
tree = smbcli_tree_init(cli->session, mem_ctx, False);
@@ -385,8 +385,8 @@ static BOOL test_tree_ulogoff(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create the first new sessions\n");
session1 = smbcli_session_init(cli->transport, mem_ctx, False);
@@ -746,8 +746,8 @@ static BOOL test_pid_2tcon(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create a second tree context on the same session\n");
tree = smbcli_tree_init(cli->session, mem_ctx, False);
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 810667134a..368a24dbae 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -247,10 +247,10 @@ static BOOL test_max_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("TESTING SETFILEINFO MAX. EA_SET\n");
- maxeasize = lp_parm_int(NULL, "torture", "maxeasize", 65536);
- maxeanames = lp_parm_int(NULL, "torture", "maxeanames", 101);
- maxeastart = lp_parm_int(NULL, "torture", "maxeastart", 1);
- maxeadebug = lp_parm_int(NULL, "torture", "maxeadebug", 0);
+ maxeasize = lp_parm_int(global_loadparm, NULL, "torture", "maxeasize", 65536);
+ maxeanames = lp_parm_int(global_loadparm, NULL, "torture", "maxeanames", 101);
+ maxeastart = lp_parm_int(global_loadparm, NULL, "torture", "maxeastart", 1);
+ maxeadebug = lp_parm_int(global_loadparm, NULL, "torture", "maxeadebug", 0);
/* Do some sanity check on possibly passed parms */
if (maxeasize <= 0) {
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 245a15d269..f55d37330a 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -599,8 +599,8 @@ static bool test_async(struct torture_context *tctx,
session->vuid = setup.out.vuid;
printf("create new tree context\n");
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
tree = smbcli_tree_init(session, tctx, False);
tcon.generic.level = RAW_TCON_TCONX;
tcon.tconx.in.flags = 0;
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index 97509606c3..d55a0a012e 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -318,7 +318,7 @@ BOOL torture_bench_lock(struct torture_context *torture)
progress = torture_setting_bool(torture, "progress", true);
- nprocs = lp_parm_int(NULL, "torture", "nprocs", 4);
+ nprocs = lp_parm_int(global_loadparm, NULL, "torture", "nprocs", 4);
state = talloc_zero_array(mem_ctx, struct benchlock_state, nprocs);
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index 2df2c6c84e..ad7027938d 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -130,7 +130,7 @@ static BOOL test_mkdir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
md.t2mkdir.in.eas[2].value = data_blob_talloc(mem_ctx, "xx1", 3);
status = smb_raw_mkdir(cli->tree, &md);
- if (lp_parm_bool(NULL, "torture", "samba3", false)
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)
&& NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)) {
d_printf("EAS not supported -- not treating as fatal\n");
}
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index b9d1d07b5e..d086dcbfde 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -711,7 +711,7 @@ static BOOL test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("Samba3 does not yet support create times "
"everywhere\n");
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index c0a32e00f4..c75d8f6bfc 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -398,7 +398,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.file_attrs = FILE_ATTRIBUTE_SYSTEM;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_ALL_INFO(FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE,
attrib & ~(FILE_ATTRIBUTE_NONINDEXED|
FILE_ATTRIBUTE_SPARSE));
@@ -569,7 +569,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
if ((io.t2open.in.num_eas != 0)
&& NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)
- && lp_parm_bool(NULL, "torture", "samba3", false)) {
+ && lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("(%s) EAs not supported, not treating as fatal "
"in Samba3 test\n", __location__);
io.t2open.in.num_eas = 0;
@@ -1346,8 +1346,8 @@ static BOOL test_raw_open_multi(void)
struct smbcli_state **clients;
struct smbcli_request **requests;
union smb_open *ios;
- const char *host = lp_parm_string(NULL, "torture", "host");
- const char *share = lp_parm_string(NULL, "torture", "share");
+ const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
int i, num_files = 3;
struct event_context *ev;
int num_ok = 0;
diff --git a/source4/torture/raw/pingpong.c b/source4/torture/raw/pingpong.c
index 6d84ff1ae9..269208b97f 100755
--- a/source4/torture/raw/pingpong.c
+++ b/source4/torture/raw/pingpong.c
@@ -191,21 +191,21 @@ bool torture_ping_pong(struct torture_context *torture)
uint8_t *val;
int count, loops;
- fn = lp_parm_string(NULL, "torture", "filename");
+ fn = lp_parm_string(global_loadparm, NULL, "torture", "filename");
if (fn == NULL) {
DEBUG(0,("You must specify the filename using --option=torture:filename=...\n"));
return false;
}
- num_locks = lp_parm_int(NULL, "torture", "num_locks", -1);
+ num_locks = lp_parm_int(global_loadparm, NULL, "torture", "num_locks", -1);
if (num_locks == -1) {
DEBUG(0,("You must specify num_locks using --option=torture:num_locks=...\n"));
return false;
}
- do_reads = lp_parm_bool(NULL, "torture", "read", false);
- do_writes = lp_parm_bool(NULL, "torture", "write", false);
- lock_timeout = lp_parm_int(NULL, "torture", "lock_timeout", 100000);
+ do_reads = lp_parm_bool(global_loadparm, NULL, "torture", "read", false);
+ do_writes = lp_parm_bool(global_loadparm, NULL, "torture", "write", false);
+ lock_timeout = lp_parm_int(global_loadparm, NULL, "torture", "lock_timeout", 100000);
if (!torture_open_connection(&cli, 0)) {
DEBUG(0,("Could not open connection\n"));
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 61bf027ae8..9a5153b553 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -482,7 +482,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
CHECK_VALUE(io.readx.out.compaction_mode, 0);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 80000);
} else {
@@ -526,7 +526,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
io.readx.in.maxcnt = 0x10000;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 0x10000);
} else {
@@ -536,7 +536,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
io.readx.in.maxcnt = 0x10001;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 0x10001);
} else {
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 88f9a71aaf..287a8b3458 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -129,7 +129,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
/*
* In Samba3 we gave up upon getting the error codes in
* wildcard unlink correct. Trying gentest showed that this is
@@ -157,7 +157,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\t*";
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
}
else {
@@ -169,7 +169,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\*.dat";
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
}
else {
@@ -179,7 +179,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\*.tx?";
io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
}
else {
@@ -282,7 +282,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- if (!lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
/*
* Known deficiency, also skipped in base-delete.