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 727836 - Kill long-running tests
Kill long-running tests
Status: RESOLVED FIXED
Product: gnome-continuous
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Continuous maintainer(s)
GNOME Continuous maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-04-08 14:48 UTC by Vadim Rutkovsky
Modified: 2014-04-12 11:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Kill tests which run more than 5 minutes (2.39 KB, patch)
2014-04-08 14:48 UTC, Vadim Rutkovsky
reviewed Details | Review
Kill tests which run more than 5 minutes (2.34 KB, patch)
2014-04-08 21:32 UTC, Vadim Rutkovsky
none Details | Review
Kill tests which run more than 5 minutes (2.36 KB, patch)
2014-04-09 09:19 UTC, Vadim Rutkovsky
accepted-commit_now Details | Review

Description Vadim Rutkovsky 2014-04-08 14:48:58 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
Comment 1 Colin Walters 2014-04-08 14:50:54 UTC
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
Comment 2 Colin Walters 2014-04-08 14:58:49 UTC
The future here should be running tests in cgroups.  Depends on systemd-for-user-session though.
Comment 3 Vadim Rutkovsky 2014-04-08 21:32:40 UTC
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
Comment 4 Vadim Rutkovsky 2014-04-09 09:19:34 UTC
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
Comment 5 Colin Walters 2014-04-09 18:53:48 UTC
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!
Comment 6 Vadim Rutkovsky 2014-04-12 11:01:40 UTC
Pushed https://git.gnome.org/browse/gnome-desktop-testing/commit/