Author: jelmer
Date: 2007-08-26 18:24:12 +0000 (Sun, 26 Aug 2007)
New Revision: 24670

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24670

Log:
Use torture functions for settings.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/torture/basic/misc.c
   branches/SAMBA_4_0/source/torture/nbench/nbench.c
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
   branches/SAMBA_4_0/source/torture/raw/oplock.c
   branches/SAMBA_4_0/source/torture/smbtorture.c
   branches/SAMBA_4_0/source/torture/util_smb.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/torture/basic/misc.c
===================================================================
--- branches/SAMBA_4_0/source/torture/basic/misc.c      2007-08-26 16:56:41 UTC 
(rev 24669)
+++ branches/SAMBA_4_0/source/torture/basic/misc.c      2007-08-26 18:24:12 UTC 
(rev 24670)
@@ -660,7 +660,7 @@
        
        /* 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 @@
        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",

Modified: branches/SAMBA_4_0/source/torture/nbench/nbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbench/nbench.c   2007-08-26 16:56:41 UTC 
(rev 24669)
+++ branches/SAMBA_4_0/source/torture/nbench/nbench.c   2007-08-26 18:24:12 UTC 
(rev 24670)
@@ -39,7 +39,7 @@
 /* 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 @@
 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) {

Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c     2007-08-26 
16:56:41 UTC (rev 24669)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c     2007-08-26 
18:24:12 UTC (rev 24670)
@@ -9651,10 +9651,9 @@
        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;

Modified: branches/SAMBA_4_0/source/torture/raw/oplock.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/oplock.c      2007-08-26 16:56:41 UTC 
(rev 24669)
+++ branches/SAMBA_4_0/source/torture/raw/oplock.c      2007-08-26 18:24:12 UTC 
(rev 24670)
@@ -1313,7 +1313,7 @@
        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;

Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c      2007-08-26 16:56:41 UTC 
(rev 24669)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c      2007-08-26 18:24:12 UTC 
(rev 24670)
@@ -337,7 +337,6 @@
 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, 

Modified: branches/SAMBA_4_0/source/torture/util_smb.c
===================================================================
--- branches/SAMBA_4_0/source/torture/util_smb.c        2007-08-26 16:56:41 UTC 
(rev 24669)
+++ branches/SAMBA_4_0/source/torture/util_smb.c        2007-08-26 18:24:12 UTC 
(rev 24670)
@@ -604,7 +604,7 @@
        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;
 

Reply via email to