diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 09:17:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 07:35:16 +0200 |
commit | 0265837ee8ab98b00c18411bee3770075e27f900 (patch) | |
tree | bd86ad96f568abc5896b0ba51f0c944b48815cfc /lib/ntdb/test/api-92-get-set-readonly.c | |
parent | 0c54e7c93627963401a1deec1e0bd1c65bdeea00 (diff) | |
download | samba-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-92-get-set-readonly.c')
-rw-r--r-- | lib/ntdb/test/api-92-get-set-readonly.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ntdb/test/api-92-get-set-readonly.c b/lib/ntdb/test/api-92-get-set-readonly.c index 7abd304eef..81eadff323 100644 --- a/lib/ntdb/test/api-92-get-set-readonly.c +++ b/lib/ntdb/test/api-92-get-set-readonly.c @@ -19,8 +19,9 @@ int main(int argc, char *argv[]) for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) { /* RW -> R0 */ - ntdb = ntdb_open("run-92-get-set-readonly.ntdb", flags[i], - O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr); + ntdb = ntdb_open("run-92-get-set-readonly.ntdb", + flags[i]|MAYBE_NOSYNC, + O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr); ok1(ntdb); ok1(!(ntdb_get_flags(ntdb) & NTDB_RDONLY)); @@ -69,8 +70,9 @@ int main(int argc, char *argv[]) ntdb_close(ntdb); /* R0 -> RW */ - ntdb = ntdb_open("run-92-get-set-readonly.ntdb", flags[i], - O_RDONLY, 0600, &tap_log_attr); + ntdb = ntdb_open("run-92-get-set-readonly.ntdb", + flags[i]|MAYBE_NOSYNC, + O_RDONLY, 0600, &tap_log_attr); ok1(ntdb); ok1(ntdb_get_flags(ntdb) & NTDB_RDONLY); |