From 00a83effc1665fcadf3f998f40b8d14f81e51b83 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 20 Jun 2014 22:28:51 +1200 Subject: [PATCH] selftest: Run base.delaywrite against plugin_s4_dc only, and with kerberos for faster connections Signed-off-by: Andrew Bartlett Reviewed-by: Jeremy Allison --- source3/selftest/tests.py | 3 +-- source4/torture/basic/delaywrite.c | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index e529b3a1ac5..e9b91d468ff 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/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c index 8db37da536c..0899e8fb425 100644 --- a/source4/torture/basic/delaywrite.c +++ b/source4/torture/basic/delaywrite.c @@ -92,7 +92,7 @@ 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 < used_delay) { + 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); @@ -1157,7 +1157,7 @@ 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 < used_delay) { + 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); @@ -1538,7 +1538,7 @@ 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 < (used_delay)) { + if (diff < (used_delay / (double)1000000)) { torture_result(tctx, TORTURE_FAIL, "Server updated write_time after %.2f seconds " "(write time update delay == %.2f) (wrong!)\n", diff, used_delay / (double)1000000); @@ -1700,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 < (used_delay)) { + if (diff < (used_delay / (double)1000000)) { torture_result(tctx, TORTURE_FAIL, "Server updated write_time after %.2f seconds " "(1sec == %.2f) (wrong!)\n", diff, sec); @@ -1911,7 +1911,7 @@ 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 < used_delay) { + 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); @@ -2280,7 +2280,7 @@ static bool test_delayed_write_update4(struct torture_context *tctx, if (finfo1.basic_info.out.write_time > finfo0.basic_info.out.write_time) { double diff = timeval_elapsed(&start); - if (diff < used_delay) { + 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);