Commit d7dc182d authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Move newbrt tests to subdir. Fixes #796.

git-svn-id: file:///svn/tokudb@3868 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3112a0eb
...@@ -58,6 +58,7 @@ REGRESSION_TESTS = \ ...@@ -58,6 +58,7 @@ REGRESSION_TESTS = \
log-test4 \ log-test4 \
log-test5 \ log-test5 \
log-test6 \ log-test6 \
memtest \
omt-test \ omt-test \
test-assert \ test-assert \
test-brt-delete-both \ test-brt-delete-both \
......
...@@ -10,39 +10,39 @@ ...@@ -10,39 +10,39 @@
void test_mempool_limits(int size) { void test_mempool_limits(int size) {
void *base = malloc(size); void *base = malloc(size);
struct mempool mempool; struct mempool mempool;
mempool_init(&mempool, base, size); toku_mempool_init(&mempool, base, size);
int i; int i;
for (i=0;; i++) { for (i=0;; i++) {
void *vp = mempool_malloc(&mempool, 1, 1); void *vp = toku_mempool_malloc(&mempool, 1, 1);
if (vp == 0) if (vp == 0)
break; break;
} }
assert(i == size); assert(i == size);
mempool_fini(&mempool); toku_mempool_fini(&mempool);
free(base); free(base);
} }
void test_mempool_malloc_mfree(int size) { void test_mempool_malloc_mfree(int size) {
void *base = malloc(size); void *base = malloc(size);
struct mempool mempool; struct mempool mempool;
mempool_init(&mempool, base, size); toku_mempool_init(&mempool, base, size);
void *vp[size]; void *vp[size];
int i; int i;
for (i=0;; i++) { for (i=0;; i++) {
vp[i] = mempool_malloc(&mempool, 1, 1); vp[i] = toku_mempool_malloc(&mempool, 1, 1);
if (vp[i] == 0) if (vp[i] == 0)
break; break;
} }
assert(i == size); assert(i == size);
for (i=0; i<size; i++) for (i=0; i<size; i++)
mempool_mfree(&mempool, vp[i], 1); toku_mempool_mfree(&mempool, vp[i], 1);
assert(mempool_get_frag_size(&mempool) == size); assert(toku_mempool_get_frag_size(&mempool) == size);
mempool_fini(&mempool); toku_mempool_fini(&mempool);
free(base); free(base);
} }
......
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