int main(int argc, char *argv[]) { START(argc, argv, "obj_pool_lock"); if (argc < 2) UT_FATAL("usage: %s path", argv[0]); if (argc == 2) { test_reopen(argv[1]); test_open_in_different_process(argc, argv, 0); for (int i = 1; i < 100000; i *= 2) test_open_in_different_process(argc, argv, i); } else if (argc == 3) { PMEMobjpool *pop; /* 2nd arg used by windows for 2 process test */ pop = pmemobj_open(argv[1], LAYOUT); if (pop) UT_FATAL("pmemobj_open after create process should " "not succeed"); if (errno != EWOULDBLOCK) UT_FATAL("!pmemobj_open after create process failed " "but for unexpected reason"); } DONE(NULL); }
int main(int argc, char *argv[]) { START(argc, argv, "log_pool_lock"); if (argc < 2) FATAL("usage: %s path", argv[0]); test_reopen(argv[1]); test_open_in_different_process(argv[1], 0); for (int i = 1; i < 100000; i *= 2) test_open_in_different_process(argv[1], i); DONE(NULL); }