diff options
| author | Stefan Metzmacher <metze@samba.org> | 2014-12-02 08:39:05 +0100 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2014-12-02 09:31:08 +0100 |
| commit | 6244346c11c40b3ed39ee626e1d27c75a29b7430 (patch) | |
| tree | 69e88848b8368fc77047fe962d2aab9be5b922d3 /lib/tdb | |
| parent | 87d39a82048474e43045515bf5c8192bc20ba668 (diff) | |
| download | samba-6244346c11c40b3ed39ee626e1d27c75a29b7430.tar.gz samba-6244346c11c40b3ed39ee626e1d27c75a29b7430.tar.xz samba-6244346c11c40b3ed39ee626e1d27c75a29b7430.zip | |
tdb/test: TDB_CLEAR_IF_FIRST | TDB_MUTEX_LOCKING, O_RDONLY is a valid combination
This used to be invalid in the early developement code, but now we're
able to open a tdb with mutex area and TDB_NOLOCK without problems.
O_RDONLY implies TDB_NOLOCK...
This should have been part of commit c8d05e934ea03fffbc34944d2d51a016b89a7eca.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'lib/tdb')
| -rw-r--r-- | lib/tdb/test/run-mutex-openflags2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tdb/test/run-mutex-openflags2.c b/lib/tdb/test/run-mutex-openflags2.c index 57ac7e3799..6522ae42fa 100644 --- a/lib/tdb/test/run-mutex-openflags2.c +++ b/lib/tdb/test/run-mutex-openflags2.c @@ -75,8 +75,9 @@ static int do_child(int fd) TDB_CLEAR_IF_FIRST | TDB_MUTEX_LOCKING, O_RDONLY, 0755, &nolog_ctx, NULL); - ok((tdb == NULL) && (errno == EINVAL), "TDB_MUTEX_LOCKING with " - "O_RDONLY should fail with EINVAL - %d", errno); + ok((tdb != NULL), "TDB_MUTEX_LOCKING with " + "O_RDONLY should work - %d", errno); + tdb_close(tdb); tdb = tdb_open_ex("mutex-openflags2.tdb", 0, TDB_CLEAR_IF_FIRST | |
