summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-13 18:43:10 -0700
committerJeremy Allison <jra@samba.org>2009-07-13 18:43:10 -0700
commite67de63ba6c6de60400e7deb4664d259f6dfb638 (patch)
treefe31b3b1936d10074b413d325d3f76be3dfe54ec /source3/torture
parentb25e3b6c8a7a1dd31607dd344e6e767716dd645d (diff)
downloadsamba-e67de63ba6c6de60400e7deb4664d259f6dfb638.tar.gz
samba-e67de63ba6c6de60400e7deb4664d259f6dfb638.tar.bz2
samba-e67de63ba6c6de60400e7deb4664d259f6dfb638.zip
Make cli_posix_lock/unlock asynchronous.
Jeremy.
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8e38093e33..8cebc2adcc 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4295,6 +4295,18 @@ static bool run_simple_posix_open_test(int dummy)
goto out;
}
+ /* Do a POSIX lock/unlock. */
+ if (!NT_STATUS_IS_OK(cli_posix_lock(cli1, fnum1, 0, 100, true, WRITE_LOCK))) {
+ printf("POSIX lock failed\n");
+ goto out;
+ }
+
+ /* Punch a hole in the locked area. */
+ if (!NT_STATUS_IS_OK(cli_posix_unlock(cli1, fnum1, 10, 80))) {
+ printf("POSIX unlock failed\n");
+ goto out;
+ }
+
cli_close(cli1, fnum1);
/* Open the symlink for read - this should fail. A POSIX