3 #include "../private.h"
4 #include "tap-interface.h"
6 #include "helpapi-external-agent.h"
8 int main(int argc, char *argv[])
11 struct ntdb_context *ntdb;
12 int flags[] = { NTDB_INTERNAL, NTDB_DEFAULT, NTDB_NOMMAP,
13 NTDB_INTERNAL|NTDB_CONVERT, NTDB_CONVERT,
14 NTDB_NOMMAP|NTDB_CONVERT };
16 plan_tests(sizeof(flags) / sizeof(flags[0]) * 3);
17 for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
18 ntdb = ntdb_open("api-80-ntdb_fd.ntdb", flags[i]|MAYBE_NOSYNC,
19 O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
23 if (flags[i] & NTDB_INTERNAL)
24 ok1(ntdb_fd(ntdb) == -1);
26 ok1(ntdb_fd(ntdb) > 2);
28 ok1(tap_log_messages == 0);