summaryrefslogtreecommitdiff
path: root/lib/ntdb/test/api-82-lockattr.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-22 09:17:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-22 07:35:16 +0200
commit0265837ee8ab98b00c18411bee3770075e27f900 (patch)
treebd86ad96f568abc5896b0ba51f0c944b48815cfc /lib/ntdb/test/api-82-lockattr.c
parent0c54e7c93627963401a1deec1e0bd1c65bdeea00 (diff)
downloadsamba-0265837ee8ab98b00c18411bee3770075e27f900.tar.gz
samba-0265837ee8ab98b00c18411bee3770075e27f900.tar.bz2
samba-0265837ee8ab98b00c18411bee3770075e27f900.zip
ntdb: respect TDB_NO_FSYNC flag for 'make test'
This reduces test time from 31 seconds to 6, on my laptop. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ntdb/test/api-82-lockattr.c')
-rw-r--r--lib/ntdb/test/api-82-lockattr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ntdb/test/api-82-lockattr.c b/lib/ntdb/test/api-82-lockattr.c
index 30de7dfddf..4fbe1d232a 100644
--- a/lib/ntdb/test/api-82-lockattr.c
+++ b/lib/ntdb/test/api-82-lockattr.c
@@ -65,31 +65,31 @@ int main(int argc, char *argv[])
/* Nonblocking open; expect no error message. */
lock_err = EAGAIN;
- ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i],
- O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
+ ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i]|MAYBE_NOSYNC,
+ O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
ok(errno == lock_err, "Errno is %u", errno);
ok1(!ntdb);
ok1(tap_log_messages == 0);
lock_err = EINTR;
- ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i],
- O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
+ ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i]|MAYBE_NOSYNC,
+ O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
ok(errno == lock_err, "Errno is %u", errno);
ok1(!ntdb);
ok1(tap_log_messages == 0);
/* Forced fail open. */
lock_err = ENOMEM;
- ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i],
- O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
+ ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i]|MAYBE_NOSYNC,
+ O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
ok1(errno == lock_err);
ok1(!ntdb);
ok1(tap_log_messages == 1);
tap_log_messages = 0;
lock_err = 0;
- ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i],
- O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
+ ntdb = ntdb_open("run-82-lockattr.ntdb", flags[i]|MAYBE_NOSYNC,
+ O_RDWR|O_CREAT|O_TRUNC, 0600, &lock_attr);
if (!ok1(ntdb))
continue;
ok1(tap_log_messages == 0);