summaryrefslogtreecommitdiffstats
path: root/source4/torture/basic/delaywrite.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-10-02 15:58:05 +0200
committerAndrew Bartlett <abartlet@samba.org>2014-10-03 08:34:05 +0200
commitbc93c8249b4ad93bebc590dede241d80f86f0291 (patch)
tree13194b0da64308a76c93d1780870932b6bd3352b /source4/torture/basic/delaywrite.c
parent91c59404217a7b5811c2ec694df1c6843344e57a (diff)
downloadsamba-bc93c8249b4ad93bebc590dede241d80f86f0291.tar.gz
samba-bc93c8249b4ad93bebc590dede241d80f86f0291.tar.xz
samba-bc93c8249b4ad93bebc590dede241d80f86f0291.zip
s4:torture:basic: use assert in the second loop in delayed_write_update1
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/delaywrite.c')
-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 284fa92905..edb3dc9a91 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -231,22 +231,21 @@ static bool test_delayed_write_update1(struct torture_context *tctx, struct smbc
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"
- "(wrong)\n",
- diff);
- 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");
fflush(stdout);
smb_msleep(2 * msec);