TESTS_LDADDS = libmemcached/libmemcached.la
-VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes
+VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes
DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
// See if memcached is reachable.
value= memcached_get(tl_memc_h, key, strlen(key), &len, &flags, &rc);
- if (value)
- {
- free(value);
- test_true(value); // Pointer won't be zero so this is fine.
- }
-
+ test_false(value);
test_true(len == 0);
test_true(rc == MEMCACHED_ERRNO);
+ memcached_free(tl_memc_h);
+
return TEST_SUCCESS;
}
// See if memcached is reachable.
value= memcached_get(memc, key, strlen(key), &len, &flags, &rc);
- if (value)
- {
- free(value);
- test_true(value); // Pointer won't be zero so this is fine.
- }
-
+ test_false(value);
test_true(len == 0);
test_true(rc == MEMCACHED_NOTFOUND);
// See if memcached is reachable.
value= memcached_get_by_key(tl_memc_h, key, strlen(key), key, strlen(key), &len, &flags, &rc);
- if (value)
- {
- free(value);
- test_true(value); // Pointer won't be zero so this is fine.
- }
-
+ test_false(value);
test_true(len == 0);
test_true(rc == MEMCACHED_ERRNO);
+ memcached_free(tl_memc_h);
+
return TEST_SUCCESS;
}
// See if memcached is reachable.
value= memcached_get_by_key(memc, key, strlen(key), key, strlen(key), &len, &flags, &rc);
- if (value)
- {
- free(value);
- test_true(value); // Pointer won't be zero so this is fine.
- }
-
+ test_false(value);
test_true(len == 0);
test_true(rc == MEMCACHED_NOTFOUND);