various tests: do not provoke SIGTRAP with -m no-undefined

Some of the GLib tests deliberately provoke warnings (or even fatal
errors) in a forked child. Normally, this is fine, but under valgrind
it's somewhat undesirable. We do want to follow fork(), so we can check
for leaks in child processes that exit gracefully; but we don't want to
be told about "leaks" in processes that are crashing, because there'd
be no point in cleaning those up anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=666116
This commit is contained in:
Simon McVittie
2011-12-14 18:08:59 +00:00
committed by Matthias Clasen
parent 5cb29d7909
commit fa4792c35e
13 changed files with 304 additions and 168 deletions

View File

@@ -615,6 +615,9 @@ base2_object_init (Base2Object *object)
static void
test_not_overridden (void)
{
if (!g_test_undefined ())
return;
g_test_bug ("637738");
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT|G_TEST_TRAP_SILENCE_STDERR))