s4:torture:basic: eliminate potential for false failures in delayed_write_update1c
authorMichael Adam <obnox@samba.org>
Thu, 2 Oct 2014 15:15:04 +0000 (17:15 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 3 Oct 2014 06:34:06 +0000 (08:34 +0200)
commitca9e46d1309c08b96a58b4260ff1512020626b12
tree7b4738425745383f369e954e32fcb75f459dfe85
parent95d333f03dcd07f62b06ea34f7d1421b4cc913bc
s4:torture:basic: eliminate potential for false failures in delayed_write_update1c

We want to test that the write did update the write time immediately.
We check this by getting the file info in a loop for a few seconds.
There are several result cases:

- the server updated the write time immediately - success
- the server updated the write time, but not immediately - failure
- the server did not update the write time - failure

The loop is only there to be able to discern between the two
failure cases. The check for success is whether the first
getinfo has reportet the updated write time.

The potential for false failures was the additional timing check.
So if the first fileinfo call just took too long (e.g. due to a
busy system), this was reported as failure.

This patch should eliminate interemittent autobuild failures.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/basic/delaywrite.c