2 test_description='run code with ASAN enabled against the library'
3 . $(dirname "$0")/test-lib.sh || exit 1
5 if [ "${NOTMUCH_HAVE_ASAN-0}" != "1" ]; then
6 printf "Skipping due to missing ASAN support\n"
10 if [ -n "${LD_PRELOAD-}" ]; then
11 printf "Skipping due to ASAN LD_PRELOAD restrictions\n"
17 TEST_CFLAGS="${TEST_CFLAGS:-} -fsanitize=address"
19 test_begin_subtest "open and destroy"
20 test_C ${MAIL_DIR} ${NOTMUCH_CONFIG} <<EOF
24 int main(int argc, char **argv) {
25 notmuch_database_t *db = NULL;
27 notmuch_status_t st = notmuch_database_open_with_config(argv[1],
28 NOTMUCH_DATABASE_MODE_READ_ONLY,
29 argv[2], NULL, &db, NULL);
31 printf("db != NULL: %d\n", db != NULL);
33 notmuch_database_destroy(db);
42 test_expect_equal_file EXPECTED OUTPUT