GNOME Bugzilla – Bug 727836
Kill long-running tests
Last modified: 2014-04-12 11:01:40 UTC
Created attachment 273808 [details] [review] Kill tests which run more than 5 minutes Some tests (like glib/closure.test) seem to timeout on continuous and stop other tests from running. These tests should be killed in some sensible amount of time. Attached patch for gnome-desktop-testing-runner kills test which runs more that specified amount of time (default: 5 minutes). Note, that it kills only the subprocess, ideally it should kill all the children
Review of attachment 273808 [details] [review]: walters> vrutkovs, g_timeout_add_seconds (opt_cancel_timeout, cancel_test, g_object_ref (proc)); <walters> vrutkovs, since you're using gs_unref_object <walters> vrutkovs, also, need to remove the timeout if the process does exit successfully
The future here should be running tests in cgroups. Depends on systemd-for-user-session though.
Created attachment 273839 [details] [review] Kill tests which run more than 5 minutes Updated patch, now it correctly removes g_source only for tests which finished successfully. Verified locally, now the integrationtest passes
Created attachment 273870 [details] [review] Kill tests which run more than 5 minutes Oops, last time I attached the wrong patch, here's the correct one
Review of attachment 273870 [details] [review]: ::: src/gnome-desktop-testing-runner.c @@ +391,3 @@ +cancel_test (gpointer data) +{ + gs_unref_object GSSubprocess *proc = data; Can you add a log message here? You could allocate a new ID for a timeout and then do: gs_log_structured_print_id_v (TEST_TIMED_OUT_MSGID, "Test timed out after %u seconds", opt_cancel_timeout); After that please commit, thanks!
Pushed https://git.gnome.org/browse/gnome-desktop-testing/commit/