summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-26 18:24:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:36 -0500
commitd981c69a18599ce7848afc3e77ad8ab14e6efbe8 (patch)
tree614a6abfaf1c3a8618a81a8b744f48835840b4c4 /source4
parent3f6cf9672ba1d25f10cbd0bb8ce1525c592a8e78 (diff)
downloadsamba-d981c69a18599ce7848afc3e77ad8ab14e6efbe8.tar.gz
samba-d981c69a18599ce7848afc3e77ad8ab14e6efbe8.tar.bz2
samba-d981c69a18599ce7848afc3e77ad8ab14e6efbe8.zip
r24670: Use torture functions for settings.
(This used to be commit a6906676309f3b1bec1a69427e7ffd0a768061b8)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/basic/misc.c4
-rw-r--r--source4/torture/nbench/nbench.c6
-rw-r--r--source4/torture/nbt/winsreplication.c7
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/smbtorture.c1
-rw-r--r--source4/torture/util_smb.c2
6 files changed, 10 insertions, 12 deletions
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index a98d34e3a8..b4584fcf58 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -660,7 +660,7 @@ static NTSTATUS benchrw_mkdir(struct torture_context *tctx,
/* open/create the files */
torture_comment(tctx, "Open File %d/%d\n",state->nr+1,
- lp_parm_int(-1, "torture", "nprocs", 4));
+ torture_setting_int(tctx, "nprocs", 4));
open_parms=talloc_zero(tctx, union smb_open);
NT_STATUS_HAVE_NO_MEMORY(open_parms);
open_parms->openx.level = RAW_OPEN_OPENX;
@@ -837,7 +837,7 @@ BOOL run_benchrw(struct torture_context *tctx)
union smb_mkdir parms;
int finished = 0;
BOOL success=True;
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(tctx, "nprocs", 4);
torture_comment(tctx, "Start BENCH-READWRITE num_ops=%d "
"num_nprocs=%d\n",
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 5cfa7dce10..ba8f3deaae 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -39,7 +39,7 @@ static int read_only;
/* run a test that simulates an approximate netbench client load */
static BOOL run_netbench(struct torture_context *tctx, struct smbcli_state *cli, int client)
{
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(tctx, "nprocs", 4);
int i;
pstring line;
char *cname;
@@ -199,11 +199,11 @@ done:
BOOL torture_nbench(struct torture_context *torture)
{
BOOL correct = True;
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(torture, "nprocs", 4);
struct smbcli_state *cli;
const char *p;
- read_only = lp_parm_bool(-1, "torture", "readonly", False);
+ read_only = torture_setting_bool(torture, "readonly", False);
p = torture_setting_string(torture, "timelimit", NULL);
if (p && *p) {
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 3f1e895e29..bc370c8b4e 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -9651,10 +9651,9 @@ static bool torture_nbt_winsreplication_owned(struct torture_context *tctx)
bool ret = true;
struct test_wrepl_conflict_conn *ctx;
- if (lp_parm_bool(-1, "torture", "quick", False)) {
- printf("skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
- return true;
- }
+ if (torture_setting_bool(tctx, "quick", false))
+ torture_skip(tctx,
+ "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index d2e15f8e82..1d6b22244a 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -1313,7 +1313,7 @@ BOOL torture_bench_oplock(struct torture_context *torture)
struct smbcli_state **cli;
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_new(torture);
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(torture, "nprocs", 4);
int i, count=0;
int timelimit = torture_setting_int(torture, "timelimit", 10);
union smb_open io;
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 02abe7f2a7..3525f0d137 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -337,7 +337,6 @@ static void subunit_init(struct torture_context *ctx)
static void subunit_suite_start(struct torture_context *ctx,
struct torture_suite *suite)
{
- printf("testsuite: %s\n", suite->name);
}
static void subunit_test_start (struct torture_context *ctx,
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index df6e8f39ce..d077b3b515 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -604,7 +604,7 @@ double torture_create_procs(struct torture_context *tctx,
volatile bool *child_status_out;
int synccount;
int tries = 8;
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(tctx, "nprocs", 4);
double start_time_limit = 10 + (torture_nprocs * 1.5);
struct timeval tv;