r24670: Use torture functions for settings.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 26 Aug 2007 18:24:12 +0000 (18:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:02:36 +0000 (15:02 -0500)
(This used to be commit a6906676309f3b1bec1a69427e7ffd0a768061b8)

source4/torture/basic/misc.c
source4/torture/nbench/nbench.c
source4/torture/nbt/winsreplication.c
source4/torture/raw/oplock.c
source4/torture/smbtorture.c
source4/torture/util_smb.c

index a98d34e3a83e96b666caf157e712dc73d0b1029e..b4584fcf58c1843147343eff11bc6b418dbe4215 100644 (file)
@@ -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",
index 5cfa7dce1047aa591c4d3f95e2d7e376c306e6a8..ba8f3deaae75ddba673c9df15d606a60d2245a11 100644 (file)
@@ -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) {
index 3f1e895e290f220b3bd668cc76048a7cfa5c716e..bc370c8b4eafb3fd1486a1688f6aa838e9dbe2a8 100644 (file)
@@ -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;
index d2e15f8e82da87c415ea2ba9fd6656265d2a1905..1d6b22244af2ed75a15fb7ed0d066fc49fa5aa31 100644 (file)
@@ -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;
index 02abe7f2a7cc4795ee19265f9373721f786d05ca..3525f0d1374f8d8244df8d7364cb488592a570c4 100644 (file)
@@ -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, 
index df6e8f39ce334f7f5576a3e4966dfe2d7f877797..d077b3b515691b7a51748c93c9c590fb32288501 100644 (file)
@@ -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;