diff --git a/src/tests/Makefile b/src/tests/Makefile index 4f8183143dd..334f3723e24 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -72,12 +72,14 @@ ifeq ($(VERBOSE),2) VERBVERBOSE=-v endif +BDB_SUPPRESSIONS = --suppressions=bdb.supressions --gen-suppressions=all + # The @ sign makes the make quiet. If there is an error there is enough info to tell what test failed. %.bdbrun: %.bdb ifdef VERBOSE - $(UNSETTOKUENV); $(VGRIND) ./$< $(VERBVERBOSE) + $(UNSETTOKUENV); $(VGRIND) $(BDB_SUPPRESSIONS) ./$< $(VERBVERBOSE) else - @ $(UNSETTOKUENV); $(VGRIND) ./$< + @ $(UNSETTOKUENV); $(VGRIND) $(BDB_SUPPRESSIONS) ./$< endif %.tdbrun: %.tdb ifdef VERBOSE @@ -85,8 +87,9 @@ ifdef VERBOSE else @ $(SETTOKUENV); $(VGRIND) ./$< endif + # For a few of the tests bdb is making valgrind unhappy. -NO_VGRIND = \ +FOO_NO_VGRIND = \ db_already_exists \ db_dup \ db_env_open_nocreate \ @@ -101,6 +104,12 @@ NO_VGRIND = \ rand_insert \ reverse_compare_fun \ # Comment to terminate list so the previous line can end with a slash + +NO_VGRIND = db_env_open_nocreate \ + db_env_open_open_close \ + db_open_notexist_reopen \ + db_remove_subdb \ + # Comment to terminate list so the previous line can end with a slash $(patsubst %,test_%.bdbrun,$(NO_VGRIND)): VGRIND= diff --git a/src/tests/bdb.supressions b/src/tests/bdb.supressions new file mode 100644 index 00000000000..5e06d9a84e7 --- /dev/null +++ b/src/tests/bdb.supressions @@ -0,0 +1,87 @@ +{ + bdb_writes_undefined_data_to_disk + Memcheck:Param + pwrite64(buf) + fun:pwrite64 + fun:__os_io + obj:/lib/libdb-4.3.so + fun:__memp_bhwrite + fun:__memp_sync_int + fun:__memp_fsync + fun:__db_sync + fun:__db_refresh + fun:__db_close + fun:__fop_subdb_setup + fun:__db_open + fun:__db_open_pp +} + +{ + bdb_leaks_db_home_strdup + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_strdup + fun:__db_open_pp + fun:main +} + +{ + bdb_leaks_in_db_create + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_calloc + fun:__bam_db_create + fun:db_create + fun:main +} + +{ + bdb_leaks_if_you_open_twice + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_strdup + fun:__db_open_pp +} + +{ + bdb_leaks_again + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_strdup + fun:__db_home + obj:/lib/libdb-4.3.so + fun:__dbenv_open +} + +{ + + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_calloc + fun:__bam_db_create + fun:db_create +} + +{ + + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_calloc + fun:__bam_db_create + fun:db_create +} + +{ + + Memcheck:Leak + fun:_vgrZU_libcZdsoZa_malloc + fun:__os_malloc + fun:__os_calloc + fun:db_create +}