summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-10-02 17:13:21 +0200
committerAndrew Bartlett <abartlet@samba.org>2014-10-03 08:34:06 +0200
commit95d333f03dcd07f62b06ea34f7d1421b4cc913bc (patch)
treeb0981cd73ff3384e23a1de4b4f7a874437542a02 /source4/torture/basic
parent8d198769d4550f26c7c6efb34316128d1017a18a (diff)
downloadsamba-95d333f03dcd07f62b06ea34f7d1421b4cc913bc.tar.gz
s4:torture:basic: use assert in the second loop in delayed_write_update1b
We can hence replace the assert after the loop by a success torture_comment. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/delaywrite.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index d0dfcdcccf4..6abb7b51f44 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -718,22 +718,21 @@ static bool test_delayed_write_update1c(struct torture_context *tctx, struct smb
torture_comment(tctx, "write time %s\n",
nt_time_string(tctx, finfo3.all_info.out.write_time));
- if (finfo2.all_info.out.write_time != finfo3.all_info.out.write_time) {
- double diff = timeval_elapsed(&start);
- torture_comment(tctx, "server updated write_time after %.2f seconds"
- "(write time update delay == %.2f)(wrong)\n",
- diff, used_delay / (double)1000000);
- break;
- }
+ torture_assert_u64_equal(tctx,
+ finfo3.all_info.out.write_time,
+ finfo2.all_info.out.write_time,
+ talloc_asprintf(tctx,
+ "Server updated write time "
+ "after %.2f seconds (wrong!)",
+ timeval_elapsed(&start)));
+
fflush(stdout);
smb_msleep(1 * msec);
}
- torture_assert_u64_equal(tctx,
- finfo3.all_info.out.write_time,
- finfo2.all_info.out.write_time,
- "Server updated write time (wrong!)");
+ torture_comment(tctx, "Server did not update write time within 10 "
+ "seconds. Good!\n");
/* the close should trigger an write time update */
smbcli_close(cli->tree, fnum1);