diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-14 13:54:56 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2018-08-17 10:34:53 +0200 |
commit | 682fafe2b3a7b196975897d6e162392d64bec4d1 (patch) | |
tree | c178fc9a7c1158886653d07efa5e50ba180964da /source3/torture | |
parent | 8734970c31d3e44d2b882c41bdfe5ff22186c9ea (diff) | |
download | samba-682fafe2b3a7b196975897d6e162392d64bec4d1.tar.gz |
torture3: Extend the g_lock6 test to also cover upgrades
The fixes for #13195 were incomplete and did not cover upgrades
properly. It's all gone in master with the new code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug 17 10:34:53 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/test_g_lock.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/torture/test_g_lock.c b/source3/torture/test_g_lock.c index 6ad42194650..624f7cdd46e 100644 --- a/source3/torture/test_g_lock.c +++ b/source3/torture/test_g_lock.c @@ -865,6 +865,14 @@ bool run_g_lock6(int dummy) nt_errstr(status)); return false; } + + status = g_lock_lock(ctx, lockname, G_LOCK_READ, + (struct timeval) { .tv_sec = 1 }); + if (!NT_STATUS_IS_OK(status)) { + fprintf(stderr, "g_lock_lock failed: %s\n", + nt_errstr(status)); + return false; + } } close(exit_pipe[1]); @@ -878,6 +886,14 @@ bool run_g_lock6(int dummy) } } + status = g_lock_lock(ctx, lockname, G_LOCK_WRITE, + (struct timeval) { .tv_sec = 1 }); + if (!NT_STATUS_IS_OK(status)) { + fprintf(stderr, "g_lock_lock failed: %s\n", + nt_errstr(status)); + return false; + } + return true; } |