From 9a86f26a5f0b421f8cf259e579fe5946b39623f6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 24 Aug 2009 18:21:23 -0700 Subject: Allow systems with timestamp granularity of 1sec to work with this test. Jeremy. --- source4/torture/basic/delaywrite.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c index 698638d03e..eb553ed0af 100644 --- a/source4/torture/basic/delaywrite.c +++ b/source4/torture/basic/delaywrite.c @@ -240,6 +240,9 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc ret = false; } + fflush(stdout); + msleep(2 * msec); + /* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */ written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1); @@ -421,6 +424,9 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb ret = false; } + fflush(stdout); + msleep(2 * msec); + /* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */ written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1); @@ -596,6 +602,9 @@ static bool test_delayed_write_update1b(struct torture_context *tctx, struct smb ret = false; } + fflush(stdout); + msleep(2 * msec); + /* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */ written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1); @@ -773,6 +782,9 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb ret = false; } + fflush(stdout); + msleep(2 * msec); + /* Do a non-zero length SMBwrite and make sure it doesn't update the write time. */ written = smbcli_smbwrite(cli->tree, fnum1, "x", 0, 1); torture_assert_int_equal(tctx, written, 1, @@ -999,6 +1011,9 @@ static bool test_delayed_write_update2(struct torture_context *tctx, struct smbc torture_comment(tctx, "Server did not update write time (correct)\n"); } + fflush(stdout); + msleep(2 * msec); + fnum2 = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE); if (fnum2 == -1) { torture_comment(tctx, "Failed to open %s\n", fname); -- cgit