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 621034 - [WIP] Rewrite apps test to ensure children are killed
[WIP] Rewrite apps test to ensure children are killed
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-08 21:54 UTC by Colin Walters
Modified: 2010-06-10 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[WIP] Rewrite apps test to ensure children are killed (17.84 KB, patch)
2010-06-08 21:54 UTC, Colin Walters
none Details | Review
Rewrite apps test to ensure children are killed (20.46 KB, patch)
2010-06-09 17:14 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2010-06-08 21:54:36 UTC
(This patch doesn't compile yet, stashing in bugzilla
 pending more work)

Create a function run_with_application that both ensures the
app is running exactly while the test is running, which most
of the tests use.  We start it beforehand, and kill it after.

Also, open a pipe between the two, and have the child app
monitor that pipe.  If it gets closed (e.g. because the parent
died), the child exits.  This is the most reliable way to
avoid stale children.
Comment 1 Colin Walters 2010-06-08 21:54:38 UTC
Created attachment 163117 [details] [review]
[WIP] Rewrite apps test to ensure children are killed
Comment 2 Colin Walters 2010-06-09 17:14:17 UTC
Created attachment 163215 [details] [review]
Rewrite apps test to ensure children are killed

Create a function run_with_application that both ensures the
app is running exactly while the test is running, which most
of the tests use.  We start it beforehand, and kill it after.
This avoids having any interdependence between the tests (and
there definitely was before, because we didn't wait for
the process to actually terminate after a kill() call).

Also, open a pipe between the two, and have the child app
monitor that pipe.  If it gets closed (e.g. because the parent
died), the child exits.  This is the most reliable way to
avoid stale children; before, if we failed an assertion, the
parent would abort, and not run kill().
Comment 3 Colin Walters 2010-06-10 13:24:51 UTC
Attachment 163215 [details] pushed as cc19922 - Rewrite apps test to ensure children are killed