summaryrefslogtreecommitdiffstats
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-03-27 14:52:26 +1300
committerJeremy Allison <jra@samba.org>2014-04-02 00:31:48 +0200
commit1bdc635f1d51fb6d39623b0cd228091673e15bd7 (patch)
tree95022074f5095da93bf12bdda12654858164db36 /source4/torture
parent547f682c153cec96fd0eafa9c76407ed45b39901 (diff)
downloadsamba-1bdc635f1d51fb6d39623b0cd228091673e15bd7.tar.gz
samba-1bdc635f1d51fb6d39623b0cd228091673e15bd7.tar.xz
samba-1bdc635f1d51fb6d39623b0cd228091673e15bd7.zip
selftest: Remove reduction in time window in delaywrite test
This causes flakey autobuilds from time to time. The reduction in the time window to 30% was added in: commit c2df97f57ce205935c37cd5a90cfeddb129cd92b Author: Jeremy Allison <jra@samba.org> Date: Thu Nov 5 15:37:26 2009 -0800 Fix up some of the timing constants for DELAYWRITE. Add some extra tests up test_delayed_write_update6 to investigate what happens to a sticky write handle after a second handle close. Jeremy. The original reduction to 75% was set in the new code commit 0d0fddf8ae856efd7ffb07ba8fa32d2f55d3f9c0 Author: Jeremy Allison <jra@samba.org> Date: Fri Sep 5 14:24:36 2008 -0700 Added tests that show that write time update is immediate when changing file size using SMBwrite of size zero, SET_END_OF_FILE, or SET_ALLOCATION_SIZE - no 2 second delay in these cases. Jeremy. (This used to be commit 3aa7523d7750fe30d1e6bb5a75ac42b681b9e493) and in: commit edb3a83a069d39e123f18de098cfaab6deb16729 Author: Stefan Metzmacher <metze@samba.org> Date: Tue Apr 8 10:25:51 2008 +0200 BASE-DELAYWRITE: use timeval_* and make it possible to spefic the writetime update delay metze (This used to be commit 751ab2992afd13548af6e67a03d3ced566cb136f) Change-Id: I8ff9fb8a8b66308f6d784351a0f43b5b234889d1 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/delaywrite.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index da03b72d431..5e05468ea68 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -96,7 +96,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 < (TIMEDELAY_SECS * sec * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds"
"(1 sec == %.2f)(wrong!)\n",
diff, sec);
@@ -212,7 +212,7 @@ 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 * 0.75)) { /* 0.75 to cope with vmware timing */
+ if (diff > (0.25 * sec)) {
torture_comment(tctx, "After SMBwrite truncate "
"server updated write_time after %.2f seconds"
"(1 sec == %.2f)(wrong!)\n",
@@ -397,7 +397,7 @@ 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 * 0.75)) { /* 0.75 to cope with vmware timing */
+ if (diff > (0.25 * sec)) {
torture_comment(tctx, "After SMBwrite truncate "
"server updated write_time after %.2f seconds"
"(1 sec == %.2f)(wrong!)\n",
@@ -572,7 +572,7 @@ 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 * 0.75)) { /* 0.75 to cope with vmware timing */
+ if (diff > (0.25 * sec)) {
torture_result(tctx, TORTURE_FAIL,
"After SET_END_OF_FILE truncate "
"server updated write_time after %.2f seconds"
@@ -751,7 +751,7 @@ 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 * 0.75)) { /* 0.75 to cope with vmware timing */
+ if (diff > (0.25 * sec)) {
torture_comment(tctx, "After SET_ALLOCATION_INFO truncate "
"server updated write_time after %.2f seconds"
"(1 sec == %.2f)(wrong!)\n",
@@ -1162,7 +1162,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 < (TIMEDELAY_SECS * sec * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds"
"(1sec == %.2f) (wrong!)\n",
diff, sec);
@@ -1543,7 +1543,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 < (TIMEDELAY_SECS * sec * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds "
"(1sec == %.2f) (wrong!)\n",
diff, sec);
@@ -1705,7 +1705,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 * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds "
"(1sec == %.2f) (wrong!)\n",
diff, sec);
@@ -1916,7 +1916,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 < (TIMEDELAY_SECS * sec * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds "
"(1sec == %.2f) (wrong!)\n",
diff, sec);
@@ -2285,7 +2285,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 < (TIMEDELAY_SECS * sec * 0.3)) { /* 0.3 to cope with vmware timing */
+ if (diff < (TIMEDELAY_SECS * sec)) {
torture_comment(tctx, "Server updated write_time after %.2f seconds "
"(1sec == %.2f) (wrong!)\n",
diff, sec);