Commit 7979395f authored by Yoni Fogel's avatar Yoni Fogel

[t:2539] Modified makefiles to behave for gcc 4.4.1.

Fixed code to remove warnings (checked result of 'system()' and printf warnings)

git-svn-id: file:///svn/toku/tokudb@19560 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2657367d
...@@ -155,7 +155,8 @@ static void benchmark_setup (void) { ...@@ -155,7 +155,8 @@ static void benchmark_setup (void) {
char unlink_cmd[strlen(dbdir) + strlen("rm -rf ") + 1]; char unlink_cmd[strlen(dbdir) + strlen("rm -rf ") + 1];
snprintf(unlink_cmd, sizeof(unlink_cmd), "rm -rf %s", dbdir); snprintf(unlink_cmd, sizeof(unlink_cmd), "rm -rf %s", dbdir);
//printf("unlink_cmd=%s\n", unlink_cmd); //printf("unlink_cmd=%s\n", unlink_cmd);
system(unlink_cmd); r = system(unlink_cmd);
CKERR(r);
if (strcmp(dbdir, ".") != 0) { if (strcmp(dbdir, ".") != 0) {
r = toku_os_mkdir(dbdir,S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); r = toku_os_mkdir(dbdir,S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
......
...@@ -229,7 +229,7 @@ static void print_engine_status(void) { ...@@ -229,7 +229,7 @@ static void print_engine_status(void) {
char buff[buffsize]; char buff[buffsize];
env->get_engine_status_text(env, buff, buffsize); env->get_engine_status_text(env, buff, buffsize);
printf("Engine status:\n"); printf("Engine status:\n");
printf(buff); printf("%s", buff);
} }
#endif #endif
} }
......
...@@ -4,6 +4,8 @@ CPPFLAGS += -I../../toku_include -I.. -I. ...@@ -4,6 +4,8 @@ CPPFLAGS += -I../../toku_include -I.. -I.
CFLAGS = -Wall -Werror -g -O0 -std=c99 CFLAGS = -Wall -Werror -g -O0 -std=c99
ifeq ($(GCCVERSION),4.4.2) ifeq ($(GCCVERSION),4.4.2)
CFLAGS += -Wno-deprecated CFLAGS += -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.1)
CFLAGS += -Wno-deprecated
endif endif
ifneq ($(GCOV),) ifneq ($(GCOV),)
CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV
......
...@@ -13,7 +13,8 @@ test_main (int argc __attribute__((__unused__)), ...@@ -13,7 +13,8 @@ test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
long long lognum; long long lognum;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
r = toku_logger_find_next_unused_log_file(dname,&lognum); r = toku_logger_find_next_unused_log_file(dname,&lognum);
assert(r==0 && lognum==0LL); assert(r==0 && lognum==0LL);
......
...@@ -14,7 +14,8 @@ int ...@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)), test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
r = toku_logger_create(&logger); r = toku_logger_create(&logger);
......
...@@ -14,7 +14,8 @@ int ...@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)), test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
r = toku_logger_create(&logger); r = toku_logger_create(&logger);
......
...@@ -14,7 +14,8 @@ int ...@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)), test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
r = toku_logger_create(&logger); assert(r == 0); r = toku_logger_create(&logger); assert(r == 0);
......
...@@ -16,7 +16,8 @@ int ...@@ -16,7 +16,8 @@ int
test_main (int argc __attribute__((__unused__)), test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
r = toku_logger_create(&logger); r = toku_logger_create(&logger);
......
...@@ -16,7 +16,8 @@ int ...@@ -16,7 +16,8 @@ int
test_main (int argc __attribute__((__unused__)), test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) { const char *argv[] __attribute__((__unused__))) {
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
r = toku_logger_create(&logger); r = toku_logger_create(&logger);
......
...@@ -67,13 +67,16 @@ test_main (int argc __attribute__((__unused__)), ...@@ -67,13 +67,16 @@ test_main (int argc __attribute__((__unused__)),
int i; int i;
int loop; int loop;
const int numloops = 100; const int numloops = 100;
int r;
for (loop = 0; loop < numloops; loop++) { for (loop = 0; loop < numloops; loop++) {
system(rmrf); r = system(rmrf);
CKERR(r);
for (i = 0; i < NUM_LOGGERS; i++) setup_logger(i); for (i = 0; i < NUM_LOGGERS; i++) setup_logger(i);
for (i = 0; i < NUM_LOGGERS; i++) play_with_logger(i); for (i = 0; i < NUM_LOGGERS; i++) play_with_logger(i);
for (i = 0; i < NUM_LOGGERS; i++) tear_down_logger(i); for (i = 0; i < NUM_LOGGERS; i++) tear_down_logger(i);
} }
system(rmrf); r = system(rmrf);
CKERR(r);
return 0; return 0;
} }
...@@ -26,7 +26,8 @@ test_main (int argc, const char *argv[]) { ...@@ -26,7 +26,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
LSN lsn = ZERO_LSN; LSN lsn = ZERO_LSN;
......
...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) { ...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
// verify the log is empty // verify the log is empty
......
...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) { ...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
LSN lsn = ZERO_LSN; LSN lsn = ZERO_LSN;
......
...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) { ...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
LSN lsn = ZERO_LSN; LSN lsn = ZERO_LSN;
......
...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) { ...@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
LSN lsn = ZERO_LSN; LSN lsn = ZERO_LSN;
......
...@@ -23,7 +23,8 @@ test_main (int argc, const char *argv[]) { ...@@ -23,7 +23,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv); default_parse_args(argc, argv);
int r; int r;
system(rmrf); r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0); r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger; TOKULOGGER logger;
LSN lsn = ZERO_LSN; LSN lsn = ZERO_LSN;
......
...@@ -15,7 +15,8 @@ run_test(void) { ...@@ -15,7 +15,8 @@ run_test(void) {
while ( 1 ) { while ( 1 ) {
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
...@@ -48,8 +49,10 @@ run_test(void) { ...@@ -48,8 +49,10 @@ run_test(void) {
sprintf(fname, "%s/%s", TESTDIR, "log000000000000.tokulog"); sprintf(fname, "%s/%s", TESTDIR, "log000000000000.tokulog");
r = toku_stat(fname, &st); assert(r==0); r = toku_stat(fname, &st); assert(r==0);
if ( st.st_size - trim > magic_begin_end_checkpoint_sz ) if ( st.st_size - trim > magic_begin_end_checkpoint_sz ) {
truncate(fname, st.st_size - trim); r = truncate(fname, st.st_size - trim);
CKERR(r);
}
else else
break; break;
// run recovery // run recovery
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -8,7 +8,8 @@ run_test(void) { ...@@ -8,7 +8,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// put begin and end checkpoint into separate log files // put begin and end checkpoint into separate log files
......
...@@ -8,7 +8,8 @@ run_test(void) { ...@@ -8,7 +8,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -20,7 +20,8 @@ run_test(void) { ...@@ -20,7 +20,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// log 1 has the checkpoint // log 1 has the checkpoint
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// create the log // create the log
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// redirect stderr // redirect stderr
......
...@@ -10,7 +10,8 @@ run_test(void) { ...@@ -10,7 +10,8 @@ run_test(void) {
int r; int r;
// setup the test dir // setup the test dir
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0); r = toku_os_mkdir(TESTDIR, S_IRWXU); assert(r == 0);
// run recovery // run recovery
......
...@@ -51,14 +51,16 @@ int test_main(int argc, const char *argv[]) { ...@@ -51,14 +51,16 @@ int test_main(int argc, const char *argv[]) {
// start from a clean directory // start from a clean directory
char rmrf_cmd[100]; char rmrf_cmd[100];
sprintf(rmrf_cmd, "rm -rf %s", LOGDIR); sprintf(rmrf_cmd, "rm -rf %s", LOGDIR);
system(rmrf_cmd); r = system(rmrf_cmd);
CKERR(r);
toku_os_mkdir(LOGDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(LOGDIR, S_IRWXU+S_IRWXG+S_IRWXO);
if ( (r=create_logfiles()) !=0 ) return r; if ( (r=create_logfiles()) !=0 ) return r;
if ( (r=test_0()) !=0 ) return r; if ( (r=test_0()) !=0 ) return r;
if ( (r=test_1()) !=0 ) return r; if ( (r=test_1()) !=0 ) return r;
system(rmrf_cmd); r = system(rmrf_cmd);
CKERR(r);
return r; return r;
} }
......
...@@ -71,7 +71,8 @@ int main(int argc, const char *argv[]) { ...@@ -71,7 +71,8 @@ int main(int argc, const char *argv[]) {
compare_fun = intcmp; compare_fun = intcmp;
dup_compare = intcmp; dup_compare = intcmp;
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
toku_os_mkdir(TESTDIR, S_IRWXU|S_IRWXG|S_IRWXO); toku_os_mkdir(TESTDIR, S_IRWXU|S_IRWXG|S_IRWXO);
run_test(FALSE); run_test(FALSE);
......
...@@ -139,7 +139,8 @@ int main(int argc, const char *argv[]) { ...@@ -139,7 +139,8 @@ int main(int argc, const char *argv[]) {
compare_fun = intcmp; compare_fun = intcmp;
dup_compare = intcmp; dup_compare = intcmp;
system("rm -rf " TESTDIR); r = system("rm -rf " TESTDIR);
CKERR(r);
toku_os_mkdir(TESTDIR, S_IRWXU|S_IRWXG|S_IRWXO); toku_os_mkdir(TESTDIR, S_IRWXU|S_IRWXG|S_IRWXO);
initial_setup(); initial_setup();
......
...@@ -83,7 +83,8 @@ static void ...@@ -83,7 +83,8 @@ static void
setup (void) { setup (void) {
DB_TXN *txn; DB_TXN *txn;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -82,7 +82,8 @@ static void ...@@ -82,7 +82,8 @@ static void
setup (void) { setup (void) {
DB_TXN *txn; DB_TXN *txn;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -77,7 +77,8 @@ static void ...@@ -77,7 +77,8 @@ static void
setup (void) { setup (void) {
DB_TXN *txn; DB_TXN *txn;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -77,7 +77,8 @@ static void ...@@ -77,7 +77,8 @@ static void
setup (void) { setup (void) {
DB_TXN *txn; DB_TXN *txn;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -11,7 +11,8 @@ static void do_1381_maybe_lock (int do_table_lock, u_int64_t *raw_count) { ...@@ -11,7 +11,8 @@ static void do_1381_maybe_lock (int do_table_lock, u_int64_t *raw_count) {
int r; int r;
DB_TXN * const null_txn = 0; DB_TXN * const null_txn = 0;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
......
...@@ -11,7 +11,8 @@ do_627 (void) { ...@@ -11,7 +11,8 @@ do_627 (void) {
int r; int r;
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
......
...@@ -26,10 +26,11 @@ insert(int i) ...@@ -26,10 +26,11 @@ insert(int i)
static void static void
checkpoint1 (void) checkpoint1 (void)
{ {
system("rm -rf " ENVDIR); int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
......
...@@ -10,7 +10,8 @@ char *nameb="b.db"; ...@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -12,8 +12,9 @@ const int num_insert = 25000; ...@@ -12,8 +12,9 @@ const int num_insert = 25000;
static void static void
setup (void) { setup (void) {
system("rm -rf " ENVDIR);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -10,8 +10,9 @@ DB_TXN *txn; ...@@ -10,8 +10,9 @@ DB_TXN *txn;
static void static void
test_setup (void) { test_setup (void) {
system("rm -rf " ENVDIR);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -52,7 +52,8 @@ static void run_test (void) { ...@@ -52,7 +52,8 @@ static void run_test (void) {
if (verbose) if (verbose)
printf("env-put-multiple num_dbs[%u]\n", num_dbs); printf("env-put-multiple num_dbs[%u]\n", num_dbs);
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -58,9 +58,10 @@ close_em (void) ...@@ -58,9 +58,10 @@ close_em (void)
static void static void
setup(void) setup(void)
{ {
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&db, env, 0); CKERR(r); r = db_create(&db, env, 0); CKERR(r);
......
...@@ -15,7 +15,8 @@ DB *db; ...@@ -15,7 +15,8 @@ DB *db;
static void initialize (void) { static void initialize (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, 0777); toku_os_mkdir(ENVDIR, 0777);
// setup environment // setup environment
......
...@@ -15,7 +15,8 @@ DB *db; ...@@ -15,7 +15,8 @@ DB *db;
static void initialize (void) { static void initialize (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, 0777); toku_os_mkdir(ENVDIR, 0777);
// setup environment // setup environment
......
...@@ -46,9 +46,10 @@ reopen_em (void) ...@@ -46,9 +46,10 @@ reopen_em (void)
static void static void
setup(void) setup(void)
{ {
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&db, env, 0); CKERR(r); r = db_create(&db, env, 0); CKERR(r);
......
...@@ -46,9 +46,10 @@ reopen_em (void) ...@@ -46,9 +46,10 @@ reopen_em (void)
static void static void
setup(void) setup(void)
{ {
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&db, env, 0); CKERR(r); r = db_create(&db, env, 0); CKERR(r);
......
...@@ -8,7 +8,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG ...@@ -8,7 +8,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG
int test_main (int argc, char * const argv[]) { int test_main (int argc, char * const argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
......
...@@ -8,7 +8,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG ...@@ -8,7 +8,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG
int test_main (int argc, char * const argv[]) { int test_main (int argc, char * const argv[]) {
parse_args(argc, argv); parse_args(argc, argv);
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
......
...@@ -15,7 +15,8 @@ static void test (void) { ...@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=100; u_int64_t limit=100;
u_int64_t ilimit=100; u_int64_t ilimit=100;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit. // set the cachetable to size 1 so that things won't fit.
......
...@@ -15,7 +15,8 @@ static void test (void) { ...@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=10; u_int64_t limit=10;
u_int64_t ilimit=10; u_int64_t ilimit=10;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit. // set the cachetable to size 1 so that things won't fit.
......
...@@ -16,7 +16,8 @@ static void test (void) { ...@@ -16,7 +16,8 @@ static void test (void) {
u_int64_t permute[limit]; u_int64_t permute[limit];
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit. // set the cachetable to size 1 so that things won't fit.
......
...@@ -15,7 +15,8 @@ static void test (void) { ...@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=30000; u_int64_t limit=30000;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
env->set_errfile(env, stderr); env->set_errfile(env, stderr);
......
...@@ -15,8 +15,9 @@ DB_TXN *txn; ...@@ -15,8 +15,9 @@ DB_TXN *txn;
static void static void
test_setup (void) { test_setup (void) {
system("rm -rf " ENVDIR);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -86,7 +86,8 @@ static void ...@@ -86,7 +86,8 @@ static void
test_setup (void) { test_setup (void) {
DB_TXN *txn; DB_TXN *txn;
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r); r=db_env_create(&env, 0); CKERR(r);
......
...@@ -54,9 +54,10 @@ static long shuffle (long l, int i) { ...@@ -54,9 +54,10 @@ static long shuffle (long l, int i) {
} }
static void do_write (void) { static void do_write (void) {
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r; int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
......
...@@ -83,10 +83,11 @@ static void ...@@ -83,10 +83,11 @@ static void
start_env(void) { start_env(void) {
assert(env==NULL); assert(env==NULL);
system("rm -rf " ENVDIR); int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r;
r = db_env_create(&env, 0); r = db_env_create(&env, 0);
CKERR(r); CKERR(r);
r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO);
......
...@@ -18,7 +18,8 @@ char *vals[N]; ...@@ -18,7 +18,8 @@ char *vals[N];
static void static void
do_x1_shutdown (void) { do_x1_shutdown (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -10,7 +10,8 @@ char *nameb="b.db"; ...@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) { static void run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ char *nameb="b.db"; ...@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) { static void run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ char *nameb="b.db"; ...@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) { static void run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ char *nameb="b.db"; ...@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) { static void run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -21,7 +21,8 @@ static int my_compare(DB *UU(db), const DBT *a, const DBT *b) { ...@@ -21,7 +21,8 @@ static int my_compare(DB *UU(db), const DBT *a, const DBT *b) {
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -9,7 +9,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG ...@@ -9,7 +9,8 @@ const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ static void ...@@ -10,7 +10,8 @@ static void
run_test (BOOL do_commit, BOOL do_abort) { run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ static void ...@@ -10,7 +10,8 @@ static void
run_test (BOOL do_commit, BOOL do_abort) { run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -15,7 +15,8 @@ static void checkpoint_callback_closeit(void *extra) { ...@@ -15,7 +15,8 @@ static void checkpoint_callback_closeit(void *extra) {
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -11,7 +11,8 @@ char *nameb="b.db"; ...@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *db; DB *db;
......
...@@ -10,7 +10,8 @@ char *namea="a.db"; ...@@ -10,7 +10,8 @@ char *namea="a.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ char *namea="a.db"; ...@@ -10,7 +10,8 @@ char *namea="a.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -21,7 +21,8 @@ static void put_something(DB_ENV *env, DB *db, char *k, char *v) { ...@@ -21,7 +21,8 @@ static void put_something(DB_ENV *env, DB *db, char *k, char *v) {
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -60,7 +60,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con ...@@ -60,7 +60,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -12,7 +12,8 @@ char *namea="a.db"; ...@@ -12,7 +12,8 @@ char *namea="a.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -19,7 +19,8 @@ const char *nameb=NAMEB; ...@@ -19,7 +19,8 @@ const char *nameb=NAMEB;
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -18,7 +18,8 @@ const char *nameb=NAMEB; ...@@ -18,7 +18,8 @@ const char *nameb=NAMEB;
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba; DB *dba;
......
...@@ -51,7 +51,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con ...@@ -51,7 +51,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -60,7 +60,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con ...@@ -60,7 +60,8 @@ put_multiple_generate(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, con
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -26,7 +26,8 @@ static void test_checkpoint_callback2(void *extra) { ...@@ -26,7 +26,8 @@ static void test_checkpoint_callback2(void *extra) {
static void run_test (BOOL do_commit, BOOL do_abort) { static void run_test (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = NULL; DB_ENV *env = NULL;
......
...@@ -11,7 +11,8 @@ char *namea="a.db"; ...@@ -11,7 +11,8 @@ char *namea="a.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -11,7 +11,8 @@ char *namea="a.db"; ...@@ -11,7 +11,8 @@ char *namea="a.db";
static void run_test (void) { static void run_test (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
......
...@@ -10,7 +10,8 @@ char *namea="a.db"; ...@@ -10,7 +10,8 @@ char *namea="a.db";
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
......
...@@ -15,7 +15,8 @@ DBT key,data; ...@@ -15,7 +15,8 @@ DBT key,data;
static void static void
do_x1_shutdown (void) { do_x1_shutdown (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
CKERR(r); CKERR(r);
......
...@@ -19,7 +19,8 @@ char *vals[N]; ...@@ -19,7 +19,8 @@ char *vals[N];
static void static void
do_x1_shutdown (void) { do_x1_shutdown (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
......
...@@ -19,7 +19,8 @@ char *vals[N]; ...@@ -19,7 +19,8 @@ char *vals[N];
static void static void
do_x1_shutdown (void) { do_x1_shutdown (void) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
......
...@@ -23,7 +23,8 @@ char *nameb="b.db"; ...@@ -23,7 +23,8 @@ char *nameb="b.db";
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -23,7 +23,8 @@ char *nameb="b.db"; ...@@ -23,7 +23,8 @@ char *nameb="b.db";
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -23,7 +23,8 @@ char *nameb="b.db"; ...@@ -23,7 +23,8 @@ char *nameb="b.db";
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -23,7 +23,8 @@ char *nameb="b.db"; ...@@ -23,7 +23,8 @@ char *nameb="b.db";
static void static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) { do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; DB *dba, *dbb;
......
...@@ -34,7 +34,8 @@ put (DB_TXN *txn, DB *db, char *key, char *data) { ...@@ -34,7 +34,8 @@ put (DB_TXN *txn, DB *db, char *key, char *data) {
static void static void
do_x2_shutdown (BOOL do_commit) { do_x2_shutdown (BOOL do_commit) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; // Use two DBs so that BDB doesn't get a lock conflict DB *dba, *dbb; // Use two DBs so that BDB doesn't get a lock conflict
......
...@@ -34,7 +34,8 @@ put (DB_TXN *txn, DB *db, char *key, char *data) { ...@@ -34,7 +34,8 @@ put (DB_TXN *txn, DB *db, char *key, char *data) {
static void static void
do_x2_shutdown (BOOL do_commit) { do_x2_shutdown (BOOL do_commit) {
int r; int r;
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env; DB_ENV *env;
DB *dba, *dbb; // Use two DBs so that BDB doesn't get a lock conflict DB *dba, *dbb; // Use two DBs so that BDB doesn't get a lock conflict
......
...@@ -47,10 +47,11 @@ static void insert(int index, int64_t i); ...@@ -47,10 +47,11 @@ static void insert(int index, int64_t i);
static void static void
start_env(void) { start_env(void) {
assert(env==NULL); assert(env==NULL);
system("rm -rf " ENVDIR); int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
int r;
r = db_env_create(&env, 0); r = db_env_create(&env, 0);
CKERR(r); CKERR(r);
r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); r = env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO);
......
...@@ -51,7 +51,8 @@ static void root_fifo_1(int n, int create_outside) { ...@@ -51,7 +51,8 @@ static void root_fifo_1(int n, int create_outside) {
int r; int r;
// create the env // create the env
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = null_env; DB_ENV *env = null_env;
......
...@@ -47,7 +47,8 @@ static void root_fifo_2(int n, int create_outside) { ...@@ -47,7 +47,8 @@ static void root_fifo_2(int n, int create_outside) {
int r; int r;
// create the env // create the env
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = null_env; DB_ENV *env = null_env;
......
...@@ -81,7 +81,8 @@ static void root_fifo_31(int n) { ...@@ -81,7 +81,8 @@ static void root_fifo_31(int n) {
int r; int r;
// create the env // create the env
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
// populate // populate
......
...@@ -81,7 +81,8 @@ static void root_fifo_32(int n) { ...@@ -81,7 +81,8 @@ static void root_fifo_32(int n) {
int r; int r;
// create the env // create the env
system("rm -rf " ENVDIR); r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
// populate // populate
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment