summaryrefslogtreecommitdiff
path: root/source3/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tests')
-rw-r--r--source3/tests/fcntl_lock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/tests/fcntl_lock.c b/source3/tests/fcntl_lock.c
index 3cd0e5ff5e..1b790b0a97 100644
--- a/source3/tests/fcntl_lock.c
+++ b/source3/tests/fcntl_lock.c
@@ -74,7 +74,8 @@ int main(int argc, char *argv[])
}
}
- fd = open(DATA, O_RDWR|O_CREAT|O_TRUNC, 0600);
+ unlink(DATA);
+ fd = open(DATA, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd == -1) {
fprintf(stderr,"ERROR: failed to open %s (errno=%d)\n",