After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700714 - [PATCH] gtestutils: Ensure test subprocesses don't dump core
[PATCH] gtestutils: Ensure test subprocesses don't dump core
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-05-20 13:36 UTC by Colin Walters
Modified: 2013-05-20 18:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't dump core (2.21 KB, patch)
2013-05-20 13:36 UTC, Colin Walters
reviewed Details | Review
0001-gtestutils-Ensure-test-subprocesses-don-t-dump-core.patch (2.21 KB, patch)
2013-05-20 17:29 UTC, Colin Walters
none Details | Review
don't dump core (4.16 KB, patch)
2013-05-20 17:30 UTC, Colin Walters
accepted-commit_now Details | Review

Description Colin Walters 2013-05-20 13:36:01 UTC
Since we expect them to crash, let's not spam the system
core dump collection (systemd, abrt).  At the moment
systemd is not very robust against programs crashing
in loops.
---
 glib/gtestutils.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)
Comment 1 Colin Walters 2013-05-20 13:36:55 UTC
Created attachment 244776 [details] [review]
don't dump core
Comment 2 Dan Winship 2013-05-20 14:43:08 UTC
Comment on attachment 244776 [details] [review]
don't dump core

Definitely agree with the sentiment. Not sure about what the right way to fix these is. Even with this patch, abrtd still seems to log that the crash happened; is there some way we can avoid that? (I guess we still need to set the core dump size to 0 as well, so we want *at least* this patch.)

I needed to add "#include <sys/resource.h>" to make this compile on F18

>+  child_setup = trap_subprocess_child_setup;

We control both processes, so you don't need to use a child setup function. Just do the setup from inside test_init() if g_test_subprocess() is TRUE (or just directly from the code that parses the --GTestSubprocess flag). And then in the future someone can add the equivalent Windows crash-dialog-suppressing code.
Comment 3 Colin Walters 2013-05-20 17:29:29 UTC
Created attachment 244847 [details] [review]
0001-gtestutils-Ensure-test-subprocesses-don-t-dump-core.patch
Comment 4 Colin Walters 2013-05-20 17:30:29 UTC
Created attachment 244848 [details] [review]
don't dump core
Comment 5 Dan Winship 2013-05-20 17:46:45 UTC
Comment on attachment 244848 [details] [review]
don't dump core

yeah, that works, other than the fact that you forgot to git add gmessages-private.h
Comment 6 Colin Walters 2013-05-20 18:08:29 UTC
Thanks!