torture: add torture_assert_int_not_equal

Signed-off-by: Michael Adam <obnox@samba.org>
torture: add torture_assert_u64_not_equal()

Signed-off-by: Michael Adam <obnox@samba.org>
s4:torture:basic: whitespace cleanup in delayed_write_update

git diff -w shows no diff

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: use torture_assert macros in delayed_write_update

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: remove two unused variables from delayed_write_update3c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: whitespace fix in delayed_write_update1

No diff with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: make use of torture_assert macros in delayed_write_update1

No logic change except for adding early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: add update into past as error condition in delayed_write_update1

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: add check for size after initial write to delayed_write_update1

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
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>
s4:torture:basic: eliminate potential for false failures in delayed_write_update1

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>
s4:torture:basic: fix spacing in the delayed_write_update1a test.

No diff visible with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: make use of torture_assert macros in delayed_write_update1a

This does not change the logic except for adding early
returns in failure cases.
But it makes the code more compact and obvious.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: add update into past as error condition in delayed_write_update1a

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: add check for size after initial write in delayed_write_update1a

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: use assert in the second loop in delayed_write_update1a

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>
s4:torture:basic: eliminate potential for false failures in delayed_write_update1a

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>
s4:torture:basic: whitespace cleanup in delayed_write_update1b

no diff with git diff -w

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: make use of torture_assert macros in delayed_write_update1b

This does not change the logic except for adding early
returns in failure cases.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:torture:basic: add update into past as error condition in delayed_write_update1b

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>