GNOME Bugzilla – Bug 621034
[WIP] Rewrite apps test to ensure children are killed
Last modified: 2010-06-10 13:24:54 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.
Created attachment 163117 [details] [review] [WIP] Rewrite apps test to ensure children are killed
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().
Attachment 163215 [details] pushed as cc19922 - Rewrite apps test to ensure children are killed