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

valgrind caught a real bug in the ybt-tests (not in the ybt itself)

git-svn-id: file:///svn/tokudb@74 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9418dc25
......@@ -3,12 +3,13 @@
# OPTFLAGS = -O2
CFLAGS = -Wall -W $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -Werror -fPIC
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS)
DTOOL = valgrind
default: bins
BINS = pma-test brt-test cachetable-test brt-serialize-test randbrt randdb4 hashtest ybt-test
bins: $(BINS)
check: bins
./ybt-test
$(DTOOL) ./ybt-test
./pma-test
./cachetable-test
./brt-serialize-test
......
......@@ -18,7 +18,9 @@ void ybt_test0 (void) {
assert(strcmp(t1.data, "foo")==0);
ybt_set_value(&t1, "byebye", 7, &v0); /* Use v0, not v1 */
assert(strcmp(t0.data, "byebye")==0); /* t0's data should be changed too, since it used v0 */
// This assertion would be wrong, since v0 may have been realloc'd, and t0.data may now point
// at the wrong place
//assert(strcmp(t0.data, "byebye")==0); /* t0's data should be changed too, since it used v0 */
assert(strcmp(t1.data, "byebye")==0);
toku_free(v0); toku_free(v1);
......
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