diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 3 | ||||
-rw-r--r-- | tests/Makefile.am | 27 | ||||
-rw-r--r-- | tests/check-empathy-utils.c | 29 | ||||
-rw-r--r-- | tests/check-helpers.c | 63 | ||||
-rw-r--r-- | tests/check-helpers.h | 43 | ||||
-rw-r--r-- | tests/check-libempathy.h | 6 | ||||
-rw-r--r-- | tests/check-main.c | 40 | ||||
-rw-r--r-- | tests/dlopen.supp | 127 | ||||
-rw-r--r-- | tests/valgrind.supp | 711 |
9 files changed, 1049 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 000000000..edf303249 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,3 @@ +check-main +contact-manager +*.log diff --git a/tests/Makefile.am b/tests/Makefile.am index 8c6094c95..29ed270ed 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,9 @@ +CLEANFILES= + +include $(top_srcdir)/rules/check.mak + +SUPPRESSIONS=valgrind.supp dlopen.supp + AM_CPPFLAGS = \ -I$(top_srcdir) \ $(EMPATHY_CFLAGS) \ @@ -13,3 +19,24 @@ bin_PROGRAMS = \ contact_manager_SOURCES = contact-manager.c +if HAVE_CHECK +check_PROGRAMS = check-main +TESTS = check-main +check_main_SOURCES = \ + check-main.c \ + check-helpers.c \ + check-helpers.h \ + check-libempathy.h \ + check-empathy-utils.c + +check_main_LDADD = \ + @CHECK_LIBS@ \ + $(top_builddir)/libempathy-gtk/libempathy-gtk.la \ + $(top_builddir)/libempathy/libempathy.la \ + $(AM_LDFLAGS) + +check_main_CFLAGS = \ + @CHECK_CFLAGS@ \ + $(AM_CFLAGS) + +endif diff --git a/tests/check-empathy-utils.c b/tests/check-empathy-utils.c new file mode 100644 index 000000000..faf261058 --- /dev/null +++ b/tests/check-empathy-utils.c @@ -0,0 +1,29 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include <check.h> +#include "check-helpers.h" +#include "check-libempathy.h" + +#include <libempathy/empathy-utils.h> + +START_TEST (test_empathy_substring) +{ + gchar *tmp; + + tmp = empathy_substring ("empathy", 2, 6); + fail_if (tmp == NULL); + fail_if (strcmp (tmp, "path") != 0); + + g_free (tmp); +} +END_TEST + +TCase * +make_empathy_utils_tcase (void) +{ + TCase *tc = tcase_create ("empathy-utils"); + tcase_add_test (tc, test_empathy_substring); + return tc; +} diff --git a/tests/check-helpers.c b/tests/check-helpers.c new file mode 100644 index 000000000..1bb14cdec --- /dev/null +++ b/tests/check-helpers.c @@ -0,0 +1,63 @@ +/* + * check-helpers.c - Source for some check helpers + * Copyright (C) 2007 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "check-helpers.h" + +static gboolean expecting_critical = FALSE; +static gboolean received_critical = FALSE; + +static void +check_helper_log_critical_func (const gchar *log_damain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + + if (!expecting_critical) + { + fail("Unexpected critical message: %s\n", message); + } + + g_assert (log_level & G_LOG_LEVEL_CRITICAL); + + received_critical = TRUE; +} + +gboolean +got_critical (void) +{ + return received_critical; +} + +void +expect_critical (gboolean expected) +{ + expecting_critical = expected; + received_critical = FALSE; +} + +void +check_helpers_init (void) +{ + g_log_set_handler (NULL, G_LOG_LEVEL_CRITICAL, + check_helper_log_critical_func, NULL); +} diff --git a/tests/check-helpers.h b/tests/check-helpers.h new file mode 100644 index 000000000..b71b3b65b --- /dev/null +++ b/tests/check-helpers.h @@ -0,0 +1,43 @@ +/* + * check-helpers.c - Source for some check helpers + * Copyright (C) 2007 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __CHECK_HELPERS_H__ +#define __CHECK_HELPERS_H__ + +#include <glib.h> +#include <check.h> + +void +check_helpers_init (void); + +void +expect_critical (gboolean expected); + +gboolean +got_critical (void); + +#define fail_unless_critical(expr, ...) \ +G_STMT_START { \ + expect_critical (TRUE); \ + expr; \ + _fail_unless (got_critical (), __FILE__, __LINE__, \ + "Expected g_critical, got none", ## __VA_ARGS__, NULL); \ + expect_critical (FALSE); \ +} G_STMT_END; + +#endif /* #ifndef __CHECK_HELPERS_H__ */ diff --git a/tests/check-libempathy.h b/tests/check-libempathy.h new file mode 100644 index 000000000..1f3302583 --- /dev/null +++ b/tests/check-libempathy.h @@ -0,0 +1,6 @@ +#ifndef __CHECK_LIBEMPATHY__ +#define __CHECK_LIBEMPATHY__ + +TCase * make_empathy_utils_tcase (void); + +#endif /* #ifndef __CHECK_LIBEMPATHY__ */ diff --git a/tests/check-main.c b/tests/check-main.c new file mode 100644 index 000000000..6dcfe3237 --- /dev/null +++ b/tests/check-main.c @@ -0,0 +1,40 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <glib-object.h> + +#include <check.h> + +#include "check-helpers.h" +#include "check-libempathy.h" + +#include "config.h" + +static Suite * +make_libempathy_suite (void) +{ + Suite *s = suite_create ("libempathy"); + + suite_add_tcase (s, make_empathy_utils_tcase ()); + + return s; +} + +int +main (void) +{ + int number_failed = 0; + Suite *s; + SRunner *sr; + + check_helpers_init (); + g_type_init (); + + s = make_libempathy_suite (); + sr = srunner_create (s); + srunner_run_all (sr, CK_NORMAL); + number_failed += srunner_ntests_failed (sr); + srunner_free (sr); + + return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/tests/dlopen.supp b/tests/dlopen.supp new file mode 100644 index 000000000..f6300a3a7 --- /dev/null +++ b/tests/dlopen.supp @@ -0,0 +1,127 @@ +{ + <dlopen> + Addrcheck,Memcheck:Cond + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <dlopen> + Addrcheck,Memcheck:Addr4 + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <dlopen> + Addrcheck,Memcheck:Cond + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <dlsym> + Addrcheck,Memcheck:Addr4 + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libc-2.5.so + fun:_dl_sym + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlsym +} +{ + <dlsym> + Addrcheck,Memcheck:Cond + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libc-2.5.so + fun:_dl_sym + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlsym +} +{ + <dlopen> + Addrcheck,Memcheck:Addr1 + fun:malloc + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <dlopen> + Addrcheck,Memcheck:Addr1 + fun:malloc + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <dlopen> + Addrcheck,Memcheck:Addr1 + fun:malloc + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + fun:dlopen +} +{ + <libdl> + Addrcheck,Memcheck:Addr4 + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so + obj:/lib/ld-2.5.so + obj:/lib/i686/cmov/libdl-2.5.so +} diff --git a/tests/valgrind.supp b/tests/valgrind.supp new file mode 100644 index 000000000..29bb04547 --- /dev/null +++ b/tests/valgrind.supp @@ -0,0 +1,711 @@ +### this file contains suppressions for valgrind when running +### the gibber/telepathy-salut unit tests based on the gstreamer one + +### syscall suppressions + +{ + <clone on Wim's Debian> + Memcheck:Param + clone(parent_tidptr) + fun:clone + fun:clone +} + +{ + <clone on Wim's Debian> + Memcheck:Param + clone(child_tidptr) + fun:clone + fun:clone +} + +{ + <clone on Wim's Debian> + Memcheck:Param + clone(tlsinfo) + fun:clone + fun:clone +} + +### glibc suppressions + +{ + <conditional jump on wim's debian 2/2/06> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +# glibc does not deallocate thread-local storage + +{ + <tls> + Memcheck:Leak + fun:calloc + fun:_dl_allocate_tls + fun:pthread_create@@* +} + +# I get an extra stack entry on x86/dapper +{ + <tls> + Memcheck:Leak + fun:calloc + obj:/lib/ld-2.3.*.so + fun:_dl_allocate_tls + fun:pthread_create@@* +} + + +{ + <pthread strstr> + Memcheck:Cond + fun:strstr + fun:__pthread_initialize_minimal + obj:/lib/libpthread-*.so + obj:/lib/libpthread-*.so + fun:call_init + fun:_dl_init + obj:/lib/ld-*.so +} + +# a thread-related free problem in glibc from Edgard +{ + __libc_freeres_rw_acess + Memcheck:Addr4 + obj:* + obj:* + obj:* + obj:* + obj:* + fun:__libc_freeres +} + +{ + <a conditional jump on wim's debian> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so +} + +# g_module_open-related problems +{ + <started showing up on fc4-quick> + Memcheck:Addr2 + fun:memcpy + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <started showing up on fc4-quick> + Memcheck:Addr4 + fun:memcpy + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <g_module_open on wim's debian> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:do_sym + fun:_dl_sym + fun:dlsym_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlsym + fun:g_module_symbol + fun:g_module_open +} + +{ + <g_module_open on wim's debian> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} +{ + <g_module_open on wim's debian> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <leak on wim's debian in g_module_open> + Memcheck:Leak + fun:malloc + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <invalid read on wim's debian> + Memcheck:Addr4 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so +} + +{ + <invalid read on wim's debian> + Memcheck:Addr4 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run +} + +{ + <invalid read on wim's debian - 2006-02-02> + Memcheck:Addr4 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <invalid read on wim's debian - 2006-02-02> + Memcheck:Addr4 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:dl_open_worker + obj:/lib/ld-2.3.*.so + fun:_dl_open + fun:dlopen_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <invalid read on wim's debian - 2006-02-02> + Memcheck:Addr4 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:do_sym + fun:_dl_sym + fun:dlsym_doit + obj:/lib/ld-2.3.*.so + fun:_dlerror_run + fun:dlsym + fun:g_module_symbol + fun:g_module_open +} + +{ + <futex on Andy's 64-bit ubuntu> + Memcheck:Param + futex(uaddr2) + fun:pthread_once + obj:/lib/libc-2.3.*.so + obj:/lib/libc-2.3.*.so + fun:mbsnrtowcs + fun:vfprintf + fun:vsprintf + fun:sprintf + obj:/lib/libc-2.3.*.so +} + +# valgrind doesn't allow me to specify a suppression for Addr1, Addr2, Addr4 +# as Addr*, so 3 copies for that; and then 2 of each for that pesky memcpy +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr1 + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr2 + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr4 + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr1 + fun:memcpy + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr2 + fun:memcpy + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} +{ + <Invalid read of size 1, 2, 4 on thomas's FC4> + Memcheck:Addr4 + fun:memcpy + fun:_dl_signal_error + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:g_module_open +} + +{ + <Addr8 on Andy's AMD64 ubuntu in dl_open> + Memcheck:Addr8 + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/libc-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:_dl_open + obj:/lib/libdl-2.3.*.so + obj:/lib/ld-2.3.*.so +} + +{ + <Conditional jump on Andy's AMD64 ubuntu> + Memcheck:Cond + obj:/lib/ld-2.3.*.so + obj:/lib/libc-2.3.*.so + obj:/lib/ld-2.3.*.so + fun:_dl_open + obj:/lib/libdl-2.3.*.so + obj:/lib/ld-2.3.*.so + obj:/lib/libdl-2.3.*.so + fun:dlopen + fun:g_module_open +} + +{ + <Mike's x86 dapper> + Memcheck:Addr4 + obj:/lib/ld-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libc-2.3.6.so + obj:/lib/ld-2.3.6.so + fun:_dl_open + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + fun:dlopen +} + +{ + <Mike's x86 dapper> + Memcheck:Cond + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libc-2.3.6.so + obj:/lib/ld-2.3.6.so + fun:_dl_open + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + fun:dlopen +} + +{ + <Another dapper one> + Memcheck:Cond + obj:/lib/ld-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libc-2.3.6.so + obj:/lib/ld-2.3.6.so + fun:_dl_open + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/tls/i686/cmov/libdl-2.3.6.so + fun:dlopen +} + +### glib suppressions +{ + <g_parse_debug_string> + Memcheck:Cond + fun:g_parse_debug_string + obj:/usr/lib*/libglib-2.0.so.* + fun:g_slice_alloc + fun:g_slice_alloc0 +} + +{ + <g_type_init malloc> + Memcheck:Leak + fun:malloc + fun:g_malloc + fun:g_strdup + fun:g_quark_from_string + obj:* + obj:* + fun:g_type_register_fundamental + obj:* + fun:g_type_init_with_debug_flags + fun:g_type_init +} + +{ + <g_type_init calloc> + Memcheck:Leak + fun:calloc + fun:g_malloc0 + obj:* + obj:* + fun:g_type_register_fundamental +} + +{ + <g_type_init calloc 2> + Memcheck:Leak + fun:calloc + fun:g_malloc0 + obj:* + obj:* + fun:g_type_init_with_debug_flags +} + +{ + <g_type_init calloc 3, GSlice version> + Memcheck:Leak + fun:calloc + fun:g_malloc0 + fun:g_slice_alloc + obj:* + obj:* + fun:g_type_init_with_debug_flags +} + +#pthread memleaks + +{ + Thread creation leak + Memcheck:Leak + fun:calloc + fun:allocate_dtv + fun:_dl_allocate* + fun:_dl_allocate* + fun:__pthread_initialize_minimal +} + +{ + Thread management leak + Memcheck:Leak + fun:calloc + fun:allocate_dtv + fun:_dl_allocate* + fun:_dl_allocate* + fun:__pthread_* +} + +{ + Thread management leak 2 + Memcheck:Leak + fun:memalign + fun:_dl_allocate* + fun:_dl_allocate* + fun:__pthread_* +} + +{ + pthread_create Syscall param write(buf) points to uninitialised byte(s) + Memcheck:Param + write(buf) + fun:pthread_create@@GLIBC_2.2.5 + fun:g_thread_create* + +} + +# nss_parse_* memleak (used by g_option_context_parse) +{ + nss_parse_* memleak + Memcheck:Leak + fun:malloc + fun:nss_parse_service_list + fun:__nss_database_lookup +} + +{ + <annoying read error inside dlopen stuff on Ubuntu Dapper x86_64> + Memcheck:Addr8 + obj:/lib/ld-2.3.6.so +} + +{ + <Ubuntu Dapper x86_64> + Memcheck:Param + futex(uaddr2) + fun:pthread_once + obj:/lib/libc-2.3.6.so + obj:/lib/libc-2.3.6.so + fun:setlocale + fun:init_pre + fun:g_option_context_parse +} + +{ + <Ubuntu Dapper x86_64 dlopen stuff again> + Memcheck:Cond + obj:/lib/ld-2.3.6.so + obj:/lib/ld-2.3.6.so + fun:_dl_open + obj:/lib/libdl-2.3.6.so + obj:/lib/ld-2.3.6.so + obj:/lib/libdl-2.3.6.so + fun:dlopen + fun:g_module_open +} +# this exists in a bunch of different variations, hence the short tail/trace +{ + <dlopen invalid read of size 4 suppression on tpm's Ubuntu edgy/x86> + Memcheck:Addr4 + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so +} +{ + <and the same for 64bit systems> + Memcheck:Addr8 + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so +} + +# More edgy suppressions (Mike) +{ + <dlopen Condition jump suppressions for Ubuntu Edgy/x86> + Memcheck:Cond + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + fun:dlopen_doit + obj:/lib/ld-2.4.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 +} + +{ + <dlopen Condition jump suppressions for Ubuntu Edgy/x86> + Memcheck:Cond + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + fun:dlopen_doit + obj:/lib/ld-2.4.so + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 +} + +{ + <dlopen Condition jump suppressions for Ubuntu Edgy/x86> + Memcheck:Cond + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + fun:do_sym + fun:_dl_sym +} + +# This one's overly general, but there's zero other information in the stack +# trace - just these five lines! +{ + <dlopen Condition jump suppressions for Ubuntu Edgy/x86> + Memcheck:Cond + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so +} + +{ + <tls leaks on Edgy/x86> + Memcheck:Leak + fun:calloc + obj:/lib/ld-2.4.so + fun:_dl_allocate_tls + fun:pthread_create@@GLIBC_2.1 +} + +{ + <libcdio 0.76 leak> + Memcheck:Leak + fun:calloc + obj:/usr/lib/libcdio.so.6.0.1 + fun:cdio_open_am_linux + obj:/usr/lib/libcdio.so.6.0.1 + fun:cdio_open_am +} + +# TLS leaks for feisty/x86 +{ + <tls leaks on Feisty/x86> + Memcheck:Leak + fun:calloc + fun:allocate_dtv + fun:_dl_allocate_tls + fun:pthread_create@@GLIBC_2.1 +} + +{ + <Addr8 on Jan's AMD64 ubuntu Feisty in dl_open> + Memcheck:Addr8 + obj:/lib/ld-2.5.so +} + +{ + <GLib caching the home dir> + Memcheck:Leak + fun:malloc + obj:/lib/libc-*.so + fun:__nss_database_lookup + obj:* + obj:* + fun:getpwnam_r + fun:g_get_any_init_do + fun:g_get_home_dir +} +{ + <GLib caching the user name> + Memcheck:Leak + fun:malloc + obj:/lib/libc-*.so + fun:__nss_database_lookup + obj:* + obj:* + fun:getpwnam_r + fun:g_get_any_init_do + fun:g_get_user_name +} |