diff options
author | Volker Lendecke <vl@samba.org> | 2018-08-14 13:54:56 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-08-23 10:39:30 +0200 |
commit | cc4eed27367822c1829778cb0599c962b54e17f6 (patch) | |
tree | 3f7184dfa406c038876db4de72999f99987f63dd | |
parent | 72a417741bf90b1a20e4d28cf720d43a3a358d03 (diff) | |
download | samba-cc4eed27367822c1829778cb0599c962b54e17f6.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>
-rw-r--r-- | selftest/knownfail.d/local-g-lock6 | 1 | ||||
-rw-r--r-- | source3/torture/test_g_lock.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/selftest/knownfail.d/local-g-lock6 b/selftest/knownfail.d/local-g-lock6 new file mode 100644 index 00000000000..14fd5c869d6 --- /dev/null +++ b/selftest/knownfail.d/local-g-lock6 @@ -0,0 +1 @@ +^samba3.smbtorture_s3.LOCAL-G-LOCK6.smbtorture diff --git a/source3/torture/test_g_lock.c b/source3/torture/test_g_lock.c index 1134e0d0716..b3b0d793fbd 100644 --- a/source3/torture/test_g_lock.c +++ b/source3/torture/test_g_lock.c @@ -779,6 +779,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]); @@ -792,5 +800,13 @@ 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; } |