The branch, master has been updated
       via  f45f2d0 torture: Remove confusing reference to (1 sec == 0.25)
       via  f3f2b52 torture: tidy up whitespace for clarity
       via  00a83ef selftest: Run base.delaywrite against plugin_s4_dc only, 
and with kerberos for faster connections
       via  0e22469 torture-base.delaywrite: assert the for a delayed write, 
that it just takes longer than our configured delay
       via  f407f58 torture: Only error if the write time was updated is less 
than the expected delay
       via  24a73bb torture: Store writetimeupdatedelay in a double to allow 
easier comparison
       via  dbe07a4 torture: convert raw.mux to use torture_comment() macros 
instead of printf()
       via  794eb40 torture: convert raw.mux to use torture_assert() macros
       via  567e0a8 torture: convert CHECK_STATUS into 
torture_assert_ntstatus_equal in raw.mux tests
       via  456c616 selftest: Only run 
samba4.rpc.samr.passwords.{lockout,badpwdcount} once
       via  0e003b3 torture: Use torture_assert() macros in rpc.samr test
      from  439de09 s3: Fix fsctl_validate_neg_info to pass MS compliance suite.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f45f2d011665df2eaae3044b8a7407ef073d7677
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:53 2014 +1200

    torture: Remove confusing reference to (1 sec == 0.25)
    
    The write should never update the time, so the fraction of the write
    time delay we use is not important.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Tue Jun 24 01:44:06 CEST 2014 on sn-devel-104

commit f3f2b52f9fb4ee8467c011fca56198984f5a117b
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:52 2014 +1200

    torture: tidy up whitespace for clarity
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 00a83effc1665fcadf3f998f40b8d14f81e51b83
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:51 2014 +1200

    selftest: Run base.delaywrite against plugin_s4_dc only, and with kerberos 
for faster connections
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 0e224698f7d5610ab681c1181cba3b7a2f042e31
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:50 2014 +1200

    torture-base.delaywrite: assert the for a delayed write, that it just takes 
longer than our configured delay
    
    This removes the hardcoded TIMEDELAY_SECS that was then made variable
    by the confusing "secs" variable
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit f407f58fd36f83ef7ead900610a1ff353c09db08
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:49 2014 +1200

    torture: Only error if the write time was updated is less than the expected 
delay
    
    The previous test was far, far too tight, it was in seconds 1/4 of the
    fraction of the normal delay we had configured Samba to use so (1/4) *
    (500 000 / 2000 000) = 1/16 (sec).  This margin appears to just be too
    tight for our loaded test server.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 24a73bb5264bda80a26761707a2cf6d9912c09ea
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:48 2014 +1200

    torture: Store writetimeupdatedelay in a double to allow easier comparison
    
    In particular, this avoids a comparison with
    double diff = timeval_elapsed() being promoted to an integer.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit dbe07a49c762cab23add4dd9afe1634dfcc9589f
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:47 2014 +1200

    torture: convert raw.mux to use torture_comment() macros instead of printf()
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Kamen Mazdrashki <kame...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 794eb404e71f931d50c44e4bd3477f99ff95f4b4
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:46 2014 +1200

    torture: convert raw.mux to use torture_assert() macros
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 567e0a88dbc0e3a0c01beda441a6379b6671f9fe
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:45 2014 +1200

    torture: convert CHECK_STATUS into torture_assert_ntstatus_equal in raw.mux 
tests
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Kamen Mazdrashki <kame...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 456c6164e9255b9719a8efec686cfe1c898cff1f
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:44 2014 +1200

    selftest: Only run samba4.rpc.samr.passwords.{lockout,badpwdcount} once
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

commit 0e003b3cc3bf42db287a54c1ddc339a53b891253
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Jun 20 22:28:43 2014 +1200

    torture: Use torture_assert() macros in rpc.samr test
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Kamen Mazdrashki <kame...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/selftest/tests.py          |    3 +-
 source4/selftest/tests.py          |    2 +-
 source4/torture/basic/delaywrite.c |  219 ++++++++++++++++++------------------
 source4/torture/raw/mux.c          |  159 ++++++++++++--------------
 source4/torture/rpc/samr.c         |   21 +---
 5 files changed, 183 insertions(+), 221 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index e529b3a..e9b91d4 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -293,8 +293,7 @@ tests= base + raw + smb2 + rpc + unix + local + rap + nbt + 
libsmbclient + idmap
 
 for t in tests:
     if t == "base.delaywrite":
-        plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp 
-U$USERNAME%$PASSWORD --maximum-runtime=900')
-        plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp 
-U$USERNAME%$PASSWORD --maximum-runtime=900')
+        plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp 
-U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
     elif t == "rap.sam":
         plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp 
-U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
         plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp 
-U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index fbd435c..698ee2c 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -86,7 +86,7 @@ ncacn_np_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", 
"rpc.dssetup", "rpc.alt
 ncalrpc_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", 
"rpc.altercontext", "rpc.netlogon", "rpc.drsuapi", "rpc.asyncbind", 
"rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext"]
 drs_rpc_tests = smbtorture4_testsuites("drs.rpc")
 ncacn_ip_tcp_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", 
"rpc.netlogon", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", 
"rpc.schannel2", "rpc.authcontext", "rpc.samr.passwords.validate"] + 
drs_rpc_tests
-slow_ncacn_np_tests = ["rpc.samlogon", "rpc.samr.users", "rpc.samr.large-dc", 
"rpc.samr.users.privileges", "rpc.samr.passwords", 
"rpc.samr.passwords.pwdlastset"]
+slow_ncacn_np_tests = ["rpc.samlogon", "rpc.samr.users", "rpc.samr.large-dc", 
"rpc.samr.users.privileges", "rpc.samr.passwords", 
"rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", 
"rpc.samr.passwords.badpwdcount"]
 slow_ncacn_ip_tcp_tests = ["rpc.samr", "rpc.cracknames"]
 
 all_rpc_tests = ncalrpc_tests + ncacn_np_tests + ncacn_ip_tcp_tests + 
slow_ncacn_np_tests + slow_ncacn_ip_tcp_tests + ["rpc.lsa.secrets", "rpc.pac", 
"rpc.samba3-sharesec", "rpc.countcalls"]
diff --git a/source4/torture/basic/delaywrite.c 
b/source4/torture/basic/delaywrite.c
index 0a03315..12d95e2 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -31,10 +31,6 @@
 #include "torture/util.h"
 #include "torture/basic/proto.h"
 
-#define W2K8R2_TIMEDELAY_SECS 1
-#define W2K3_TIMEDELAY_SECS 2
-#define TIMEDELAY_SECS W2K3_TIMEDELAY_SECS
-
 #define BASEDIR "\\delaywrite"
 
 static bool test_delayed_write_update(struct torture_context *tctx, struct 
smbcli_state *cli)
@@ -47,7 +43,7 @@ static bool test_delayed_write_update(struct torture_context 
*tctx, struct smbcl
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -83,7 +79,7 @@ static bool test_delayed_write_update(struct torture_context 
*tctx, struct smbcl
        }
 
        start = timeval_current();
-       end = timeval_add(&start, (120*sec), 0);
+       end = timeval_add(&start, (120 * sec), 0);
        while (!timeval_expired(&end)) {
                status = smb_raw_fileinfo(cli->tree, tctx, &finfo2);
 
@@ -96,17 +92,16 @@ static bool test_delayed_write_update(struct 
torture_context *tctx, struct smbcl
                       nt_time_string(tctx, finfo2.basic_info.out.write_time));
                if (finfo1.basic_info.out.write_time != 
finfo2.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff < (TIMEDELAY_SECS * sec)) {
+                       if (diff < (used_delay / (double)1000000)) {
                                torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds"
-                                               "(1 sec == %.2f)(wrong!)\n",
-                                               diff, sec);
+                                               "(expected > %.2f) (wrong!)\n",
+                                               diff, used_delay / 
(double)1000000);
                                ret = false;
                                break;
                        }
 
-                       torture_comment(tctx, "Server updated write_time after 
%.2f seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                       torture_comment(tctx, "Server updated write_time after 
%.2f seconds (correct)\n",
+                                       diff);
                        break;
                }
                fflush(stdout);
@@ -138,7 +133,7 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -190,7 +185,7 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
        }
 
        start = timeval_current();
-       end = timeval_add(&start, (120*sec), 0);
+       end = timeval_add(&start, (120 * sec), 0);
        while (!timeval_expired(&end)) {
                status = smb_raw_fileinfo(cli->tree, tctx, &finfo2);
 
@@ -212,11 +207,11 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
                       nt_time_string(tctx, finfo2.all_info.out.write_time));
                if (finfo1.all_info.out.write_time != 
finfo2.all_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff > (0.25 * sec)) {
+                       if (diff > (0.25 * (used_delay / (double)1000000))) {
                                torture_result(tctx, TORTURE_FAIL, "After 
SMBwrite truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(wrong!)\n",
-                                       diff, sec);
+                                       "(write time update dealy == 
%.2f)(wrong!)\n",
+                                              diff, used_delay / 
(double)1000000);
                                ret = false;
                                break;
                        }
@@ -224,7 +219,7 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
                        torture_comment(tctx, "After SMBwrite truncate "
                                        "server updated write_time after %.2f 
seconds"
                                        "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -274,8 +269,8 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
                        double diff = timeval_elapsed(&start);
 
                        torture_comment(tctx, "server updated write_time after 
%.2f seconds"
-                                       "(1 sec == %.2f)(wrong)\n",
-                                       diff, sec);
+                                       "(wrong)\n",
+                                       diff);
                        break;
                }
                fflush(stdout);
@@ -327,7 +322,7 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -397,19 +392,19 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
                       nt_time_string(tctx, finfo2.all_info.out.write_time));
                if (finfo1.all_info.out.write_time != 
finfo2.all_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff > (0.25 * sec)) {
+                       if (diff > (0.25 * (used_delay / (double)1000000))) {
                                torture_result(tctx, TORTURE_FAIL, "After 
SMBwrite truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(wrong!)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(wrong!)\n",
+                                       diff, used_delay / (double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "After SMBwrite truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -457,8 +452,8 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
                        double diff = timeval_elapsed(&start);
 
                        torture_result(tctx, TORTURE_FAIL, "server updated 
write_time after %.2f seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -507,7 +502,7 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -572,20 +567,20 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
                       nt_time_string(tctx, finfo2.all_info.out.write_time));
                if (finfo1.all_info.out.write_time != 
finfo2.all_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff > (0.25 * sec)) {
+                       if (diff > (0.25 * (used_delay / (double)1000000))) {
                                torture_result(tctx, TORTURE_FAIL, 
                                        "After SET_END_OF_FILE truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(wrong!)",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(wrong!)",
+                                       diff, used_delay / (double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "After SET_END_OF_FILE truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -632,8 +627,8 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
                        double diff = timeval_elapsed(&start);
 
                        torture_comment(tctx, "server updated write_time after 
%.2f seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -680,7 +675,7 @@ static bool test_delayed_write_update1c(struct 
torture_context *tctx, struct smb
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -751,19 +746,19 @@ static bool test_delayed_write_update1c(struct 
torture_context *tctx, struct smb
                       nt_time_string(tctx, finfo2.all_info.out.write_time));
                if (finfo1.all_info.out.write_time != 
finfo2.all_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff > (0.25 * sec)) {
+                       if (diff > (0.25 * (used_delay / (double)1000000))) {
                                torture_result(tctx, TORTURE_FAIL, "After 
SET_ALLOCATION_INFO truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(wrong!)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(wrong!)\n",
+                                       diff, used_delay / (double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "After SET_ALLOCATION_INFO 
truncate "
                                        "server updated write_time after %.2f 
seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -808,8 +803,8 @@ static bool test_delayed_write_update1c(struct 
torture_context *tctx, struct smb
                        double diff = timeval_elapsed(&start);
 
                        torture_comment(tctx, "server updated write_time after 
%.2f seconds"
-                                       "(1 sec == %.2f)(correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == 
%.2f)(wrong)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                fflush(stdout);
@@ -860,7 +855,7 @@ static bool test_delayed_write_update2(struct 
torture_context *tctx, struct smbc
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -990,8 +985,8 @@ static bool test_delayed_write_update2(struct 
torture_context *tctx, struct smbc
                if (finfo1.basic_info.out.write_time != 
finfo2.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds"
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -1082,8 +1077,8 @@ static bool test_delayed_write_update2(struct 
torture_context *tctx, struct smbc
                if (finfo1.basic_info.out.write_time != 
finfo2.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -1162,17 +1157,17 @@ static bool test_delayed_write_update2(struct 
torture_context *tctx, struct smbc
                       nt_time_string(tctx, finfo2.basic_info.out.write_time));
                if (finfo1.basic_info.out.write_time != 
finfo2.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff < (TIMEDELAY_SECS * sec)) {
+                       if (diff < (used_delay / (double)1000000)) {
                                torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds"
-                                               "(1sec == %.2f) (wrong!)\n",
-                                               diff, sec);
+                                               "(expected > %.2f) (wrong!)\n",
+                                               diff, used_delay / 
(double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "Server updated write_time after 
%.2f seconds"
-                                       "(1sec == %.2f) (correct)\n",
-                                       diff, sec);
+                                       "(correct)\n",
+                                       diff);
                        break;
                }
                fflush(stdout);
@@ -1218,7 +1213,7 @@ static bool test_finfo_after_write(struct torture_context 
*tctx, struct smbcli_s
        int fnum2;
        bool ret = true;
        ssize_t written;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -1490,7 +1485,7 @@ static bool test_delayed_write_update3(struct 
torture_context *tctx,
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -1543,17 +1538,17 @@ static bool test_delayed_write_update3(struct 
torture_context *tctx,
 
                if (finfo1.basic_info.out.write_time > 
finfo0.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff < (TIMEDELAY_SECS * sec)) {
+                       if (diff < (used_delay / (double)1000000)) {
                                torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds "
-                                               "(1sec == %.2f) (wrong!)\n",
-                                               diff, sec);
+                                               "(write time update delay == 
%.2f) (wrong!)\n",
+                                               diff, used_delay / 
(double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "Server updated write_time after 
%.2f seconds "
-                                       "(1sec == %.2f) (correct)\n",
-                                       diff, sec);
+                                       "(correct)\n",
+                                       diff);
                        break;
                }
                smb_msleep(0.5 * msec);
@@ -1580,8 +1575,8 @@ static bool test_delayed_write_update3(struct 
torture_context *tctx,
                if (finfo2.basic_info.out.write_time > 
finfo1.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -1642,7 +1637,7 @@ static bool test_delayed_write_update3a(struct 
torture_context *tctx,
        int i;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -1705,7 +1700,7 @@ static bool test_delayed_write_update3a(struct 
torture_context *tctx,
 
                if (finfo1.basic_info.out.write_time > 
finfo0.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff < (TIMEDELAY_SECS * sec)) {
+                       if (diff < (used_delay / (double)1000000)) {
                                torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds "
                                                "(1sec == %.2f) (wrong!)\n",
                                                diff, sec);
@@ -1714,8 +1709,8 @@ static bool test_delayed_write_update3a(struct 
torture_context *tctx,
                        }
 
                        torture_comment(tctx, "Server updated write_time after 
%.2f seconds "
-                                       "(1sec == %.2f) (correct)\n",
-                                       diff, sec);
+                                       "(correct)\n",
+                                       diff);
                        break;
                }
                smb_msleep(0.5 * msec);
@@ -1766,8 +1761,8 @@ static bool test_delayed_write_update3a(struct 
torture_context *tctx,
                if (finfo2.basic_info.out.write_time > 
finfo1.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -1853,7 +1848,7 @@ static bool test_delayed_write_update3b(struct 
torture_context *tctx,
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -1916,17 +1911,17 @@ static bool test_delayed_write_update3b(struct 
torture_context *tctx,
 
                if (finfo1.basic_info.out.write_time > 
finfo0.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
-                       if (diff < (TIMEDELAY_SECS * sec)) {
-                               torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds "
-                                               "(1sec == %.2f) (wrong!)\n",
-                                               diff, sec);
+                       if (diff < (used_delay / (double)1000000)) {
+                               torture_result(tctx, TORTURE_FAIL, "Server 
updated write_time after %.2f seconds"
+                                               "(expected > %.2f) (wrong!)\n",
+                                               diff, used_delay / 
(double)1000000);
                                ret = false;
                                break;
                        }
 
                        torture_comment(tctx, "Server updated write_time after 
%.2f seconds "
-                                       "(1sec == %.2f) (correct)\n",
-                                       diff, sec);
+                                       "(write time update delay == %.2f) 
(correct)\n",
+                                       diff, used_delay / (double)1000000);
                        break;
                }
                smb_msleep(0.5 * msec);
@@ -1953,8 +1948,8 @@ static bool test_delayed_write_update3b(struct 
torture_context *tctx,
                if (finfo2.basic_info.out.write_time > 
finfo1.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -2017,7 +2012,7 @@ static bool test_delayed_write_update3c(struct 
torture_context *tctx,
        int i;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;
        double sec = ((double)used_delay) / ((double)normal_delay);
        int msec = 1000 * sec;
@@ -2098,8 +2093,8 @@ static bool test_delayed_write_update3c(struct 
torture_context *tctx,
                if (finfo2.basic_info.out.write_time > 
finfo1.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -2163,8 +2158,8 @@ static bool test_delayed_write_update3c(struct 
torture_context *tctx,
                if (finfo2.basic_info.out.write_time > 
finfo1.basic_info.out.write_time) {
                        double diff = timeval_elapsed(&start);
                        torture_result(tctx, TORTURE_FAIL, "Server updated 
write_time after %.2f seconds "
-                                       "(1sec == %.2f) (wrong!)\n",
-                                       diff, sec);
+                                       "(wrong!)\n",
+                                       diff);
                        ret = false;
                        break;
                }
@@ -2225,7 +2220,7 @@ static bool test_delayed_write_update4(struct 
torture_context *tctx,
        ssize_t written;
        struct timeval start;
        struct timeval end;
-       int used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
+       double used_delay = torture_setting_int(tctx, "writetimeupdatedelay", 
2000000);
        int normal_delay = 2000000;


-- 
Samba Shared Repository

Reply via email to