Commit 500ce4ac authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:2449] Fix USE_PUTS

git-svn-id: file:///svn/toku/tokudb@19775 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8ab0538b
...@@ -350,7 +350,7 @@ static int poll_function (void *extra, float progress) { ...@@ -350,7 +350,7 @@ static int poll_function (void *extra, float progress) {
assert(extra==expect_poll_void); assert(extra==expect_poll_void);
assert(0.0<=progress && progress<=1.0); assert(0.0<=progress && progress<=1.0);
poll_count++; poll_count++;
return 0; return abort_on_poll;
} }
static void test_loader(enum test_type t, DB **dbs) static void test_loader(enum test_type t, DB **dbs)
...@@ -416,7 +416,12 @@ static void test_loader(enum test_type t, DB **dbs) ...@@ -416,7 +416,12 @@ static void test_loader(enum test_type t, DB **dbs)
if (!USE_PUTS) if (!USE_PUTS)
assert(poll_count>0); assert(poll_count>0);
} }
else if (t == abort_via_poll) {
assert(!USE_PUTS); // test makes no sense with USE_PUTS
printf("closing, but expecting abort via poll\n");
r = loader->close(loader);
assert(r); // not defined what close() returns when poll function returns non-zero
}
else { else {
printf("aborting loader"); fflush(stdout); printf("aborting loader"); fflush(stdout);
r = loader->abort(loader); r = loader->abort(loader);
...@@ -505,8 +510,10 @@ int test_main(int argc, char * const *argv) { ...@@ -505,8 +510,10 @@ int test_main(int argc, char * const *argv) {
run_test(commit); run_test(commit);
if (verbose) printf("\n\nTesting loader with loader abort and txn abort\n"); if (verbose) printf("\n\nTesting loader with loader abort and txn abort\n");
run_test(abort_loader); run_test(abort_loader);
if (!USE_PUTS) {
if (verbose) printf("\n\nTesting loader with loader abort_via_poll and txn abort\n"); if (verbose) printf("\n\nTesting loader with loader abort_via_poll and txn abort\n");
run_test(abort_via_poll); run_test(abort_via_poll);
}
if (verbose) printf("\n\nTesting loader with loader close and txn abort\n"); if (verbose) printf("\n\nTesting loader with loader close and txn abort\n");
run_test(abort_txn); run_test(abort_txn);
return 0; return 0;
......
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