3 #include "tap-interface.h"
9 int main(int argc
, char *argv
[])
12 struct ntdb_context
*ntdb
;
13 int flags
[] = { NTDB_INTERNAL
, NTDB_DEFAULT
, NTDB_NOMMAP
,
14 NTDB_INTERNAL
|NTDB_CONVERT
, NTDB_CONVERT
,
15 NTDB_NOMMAP
|NTDB_CONVERT
};
17 plan_tests(sizeof(flags
) / sizeof(flags
[0]) * 3);
18 for (i
= 0; i
< sizeof(flags
) / sizeof(flags
[0]); i
++) {
19 ntdb
= ntdb_open("api-80-ntdb_fd.ntdb", flags
[i
]|MAYBE_NOSYNC
,
20 O_RDWR
|O_CREAT
|O_TRUNC
, 0600, &tap_log_attr
);
24 if (flags
[i
] & NTDB_INTERNAL
)
25 ok1(ntdb_fd(ntdb
) == -1);
27 ok1(ntdb_fd(ntdb
) > 2);
29 ok1(tap_log_messages
== 0);