s4:torture:basic: add update into past as error condition in delayed_write_update1a
authorMichael Adam <obnox@samba.org>
Thu, 2 Oct 2014 13:49:07 +0000 (15:49 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 3 Oct 2014 06:34:05 +0000 (08:34 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/basic/delaywrite.c

index 0dd16a1a6c590b1a2e3499cf9284547fe8aa1c18..d47c6f9ff007b5aa50db1aa3253f897627f3f7ac 100644 (file)
@@ -422,9 +422,12 @@ static bool test_delayed_write_update1a(struct torture_context *tctx, struct smb
                                     finfo3.all_info.out.write_time,
                                     "Server did not update write time on "
                                     "close (wrong!)");
-       if (finfo3.all_info.out.write_time < pinfo4.all_info.out.write_time) {
-               torture_comment(tctx, "Server updated write time on close (correct)\n");
-       }
+       torture_assert(tctx,
+               pinfo4.all_info.out.write_time > finfo3.all_info.out.write_time,
+               "Server updated write time on close, but to an earlier point "
+               "in time");
+
+       torture_comment(tctx, "Server updated write time on close (correct)\n");
 
        if (fnum1 != -1)
                smbcli_close(cli->tree, fnum1);