Commit 7af17fd6 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 c68ec6e3
......@@ -155,7 +155,8 @@ static void benchmark_setup (void) {
char unlink_cmd[strlen(dbdir) + strlen("rm -rf ") + 1];
snprintf(unlink_cmd, sizeof(unlink_cmd), "rm -rf %s", dbdir);
//printf("unlink_cmd=%s\n", unlink_cmd);
system(unlink_cmd);
r = system(unlink_cmd);
CKERR(r);
if (strcmp(dbdir, ".") != 0) {
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) {
char buff[buffsize];
env->get_engine_status_text(env, buff, buffsize);
printf("Engine status:\n");
printf(buff);
printf("%s", buff);
}
#endif
}
......
......@@ -4,6 +4,8 @@ CPPFLAGS += -I../../toku_include -I.. -I.
CFLAGS = -Wall -Werror -g -O0 -std=c99
ifeq ($(GCCVERSION),4.4.2)
CFLAGS += -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.1)
CFLAGS += -Wno-deprecated
endif
ifneq ($(GCOV),)
CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV
......
......@@ -13,7 +13,8 @@ test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
long long lognum;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
r = toku_logger_find_next_unused_log_file(dname,&lognum);
assert(r==0 && lognum==0LL);
......
......@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
r = toku_logger_create(&logger);
......
......@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
r = toku_logger_create(&logger);
......
......@@ -14,7 +14,8 @@ int
test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
r = toku_logger_create(&logger); assert(r == 0);
......
......@@ -16,7 +16,8 @@ int
test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
r = toku_logger_create(&logger);
......
......@@ -16,7 +16,8 @@ int
test_main (int argc __attribute__((__unused__)),
const char *argv[] __attribute__((__unused__))) {
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
r = toku_logger_create(&logger);
......
......@@ -67,13 +67,16 @@ test_main (int argc __attribute__((__unused__)),
int i;
int loop;
const int numloops = 100;
int r;
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++) play_with_logger(i);
for (i = 0; i < NUM_LOGGERS; i++) tear_down_logger(i);
}
system(rmrf);
r = system(rmrf);
CKERR(r);
return 0;
}
......@@ -26,7 +26,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
......
......@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
// verify the log is empty
......
......@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
......
......@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
......
......@@ -15,7 +15,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
......
......@@ -23,7 +23,8 @@ test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
system(rmrf);
r = system(rmrf);
CKERR(r);
r = toku_os_mkdir(dname, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
......
......@@ -15,7 +15,8 @@ run_test(void) {
while ( 1 ) {
// 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);
// create the log
......@@ -48,8 +49,10 @@ run_test(void) {
sprintf(fname, "%s/%s", TESTDIR, "log000000000000.tokulog");
r = toku_stat(fname, &st); assert(r==0);
if ( st.st_size - trim > magic_begin_end_checkpoint_sz )
truncate(fname, st.st_size - trim);
if ( st.st_size - trim > magic_begin_end_checkpoint_sz ) {
r = truncate(fname, st.st_size - trim);
CKERR(r);
}
else
break;
// run recovery
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -8,7 +8,8 @@ run_test(void) {
int r;
// 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);
// put begin and end checkpoint into separate log files
......
......@@ -8,7 +8,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -20,7 +20,8 @@ run_test(void) {
int r;
// 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);
// log 1 has the checkpoint
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// create the log
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// redirect stderr
......
......@@ -10,7 +10,8 @@ run_test(void) {
int r;
// 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);
// run recovery
......
......@@ -51,14 +51,16 @@ int test_main(int argc, const char *argv[]) {
// start from a clean directory
char rmrf_cmd[100];
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);
if ( (r=create_logfiles()) !=0 ) return r;
if ( (r=test_0()) !=0 ) return r;
if ( (r=test_1()) !=0 ) return r;
system(rmrf_cmd);
r = system(rmrf_cmd);
CKERR(r);
return r;
}
......
......@@ -71,7 +71,8 @@ int main(int argc, const char *argv[]) {
compare_fun = 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);
run_test(FALSE);
......
......@@ -139,7 +139,8 @@ int main(int argc, const char *argv[]) {
compare_fun = 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);
initial_setup();
......
......@@ -83,7 +83,8 @@ static void
setup (void) {
DB_TXN *txn;
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=db_env_create(&env, 0); CKERR(r);
......
......@@ -82,7 +82,8 @@ static void
setup (void) {
DB_TXN *txn;
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=db_env_create(&env, 0); CKERR(r);
......
......@@ -77,7 +77,8 @@ static void
setup (void) {
DB_TXN *txn;
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=db_env_create(&env, 0); CKERR(r);
......
......@@ -77,7 +77,8 @@ static void
setup (void) {
DB_TXN *txn;
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=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) {
int r;
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);
......
......@@ -11,7 +11,8 @@ do_627 (void) {
int r;
DB_ENV *env;
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=db_env_create(&env, 0); assert(r==0);
......
......@@ -26,10 +26,11 @@ insert(int i)
static 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);
int 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);
......
......@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -12,8 +12,9 @@ const int num_insert = 25000;
static void
setup (void) {
system("rm -rf " ENVDIR);
int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r);
......
......@@ -10,8 +10,9 @@ DB_TXN *txn;
static void
test_setup (void) {
system("rm -rf " ENVDIR);
int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r);
......
......@@ -52,7 +52,8 @@ static void run_test (void) {
if (verbose)
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);
DB_ENV *env;
......
......@@ -58,9 +58,10 @@ close_em (void)
static void
setup(void)
{
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
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 = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&db, env, 0); CKERR(r);
......
......@@ -15,7 +15,8 @@ DB *db;
static void initialize (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, 0777);
// setup environment
......
......@@ -15,7 +15,8 @@ DB *db;
static void initialize (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, 0777);
// setup environment
......
......@@ -46,9 +46,10 @@ reopen_em (void)
static void
setup(void)
{
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
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 = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&db, env, 0); CKERR(r);
......
......@@ -46,9 +46,10 @@ reopen_em (void)
static void
setup(void)
{
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
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 = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); 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
int test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
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
int test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r);
......
......@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=100;
u_int64_t ilimit=100;
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=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit.
......
......@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=10;
u_int64_t ilimit=10;
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=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit.
......
......@@ -16,7 +16,8 @@ static void test (void) {
u_int64_t permute[limit];
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=db_env_create(&env, 0); CKERR(r);
// set the cachetable to size 1 so that things won't fit.
......
......@@ -15,7 +15,8 @@ static void test (void) {
u_int64_t limit=30000;
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=db_env_create(&env, 0); CKERR(r);
env->set_errfile(env, stderr);
......
......@@ -15,8 +15,9 @@ DB_TXN *txn;
static void
test_setup (void) {
system("rm -rf " ENVDIR);
int r;
r = system("rm -rf " ENVDIR);
CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_env_create(&env, 0); CKERR(r);
......
......@@ -86,7 +86,8 @@ static void
test_setup (void) {
DB_TXN *txn;
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=db_env_create(&env, 0); CKERR(r);
......
......@@ -54,9 +54,10 @@ static long shuffle (long l, int i) {
}
static void do_write (void) {
system("rm -rf " ENVDIR);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
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 = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
......
......@@ -83,10 +83,11 @@ static void
start_env(void) {
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);
int 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);
......
......@@ -18,7 +18,8 @@ char *vals[N];
static void
do_x1_shutdown (void) {
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=db_env_create(&env, 0); assert(r==0);
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *db;
......
......@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ char *nameb="b.db";
static void run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -21,7 +21,8 @@ static int my_compare(DB *UU(db), const DBT *a, const DBT *b) {
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -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) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ static void
run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ static void
run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -15,7 +15,8 @@ static void checkpoint_callback_closeit(void *extra) {
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *db;
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *db;
......
......@@ -11,7 +11,8 @@ char *nameb="b.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *db;
......
......@@ -10,7 +10,8 @@ char *namea="a.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ char *namea="a.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -21,7 +21,8 @@ static void put_something(DB_ENV *env, DB *db, char *k, char *v) {
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -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) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -12,7 +12,8 @@ char *namea="a.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -19,7 +19,8 @@ const char *nameb=NAMEB;
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -18,7 +18,8 @@ const char *nameb=NAMEB;
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba;
......
......@@ -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) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -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) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -26,7 +26,8 @@ static void test_checkpoint_callback2(void *extra) {
static void run_test (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = NULL;
......
......@@ -11,7 +11,8 @@ char *namea="a.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -11,7 +11,8 @@ char *namea="a.db";
static void run_test (void) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
......
......@@ -10,7 +10,8 @@ char *namea="a.db";
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r);
......
......@@ -15,7 +15,8 @@ DBT key,data;
static void
do_x1_shutdown (void) {
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);
......
......@@ -19,7 +19,8 @@ char *vals[N];
static void
do_x1_shutdown (void) {
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=db_env_create(&env, 0); assert(r==0);
......
......@@ -19,7 +19,8 @@ char *vals[N];
static void
do_x1_shutdown (void) {
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=db_env_create(&env, 0); assert(r==0);
......
......@@ -23,7 +23,8 @@ char *nameb="b.db";
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -23,7 +23,8 @@ char *nameb="b.db";
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -23,7 +23,8 @@ char *nameb="b.db";
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -23,7 +23,8 @@ char *nameb="b.db";
static void
do_x1_shutdown (BOOL do_commit, BOOL do_abort) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
DB *dba, *dbb;
......
......@@ -34,7 +34,8 @@ put (DB_TXN *txn, DB *db, char *key, char *data) {
static void
do_x2_shutdown (BOOL do_commit) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
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) {
static void
do_x2_shutdown (BOOL do_commit) {
int r;
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env;
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);
static void
start_env(void) {
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);
int 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);
......
......@@ -51,7 +51,8 @@ static void root_fifo_1(int n, int create_outside) {
int r;
// create the env
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = null_env;
......
......@@ -47,7 +47,8 @@ static void root_fifo_2(int n, int create_outside) {
int r;
// create the env
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
DB_ENV *env = null_env;
......
......@@ -81,7 +81,8 @@ static void root_fifo_31(int n) {
int r;
// create the env
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
// populate
......
......@@ -81,7 +81,8 @@ static void root_fifo_32(int n) {
int r;
// create the env
system("rm -rf " ENVDIR);
r = system("rm -rf " ENVDIR);
CKERR(r);
toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO);
// 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