From 2aeececacc18204f763ec946b35877afb1f8f5b5 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Fri, 13 Oct 2017 14:30:09 +0300 Subject: aux: Use IGT version of system() call to run rtcwake The clone() system call has difficulty to make progress if interrupted frequently by the signal helper process. At least on an APL, like in the Bugzilla ticket below, this can introduce minutes of overhead to a single system() call (leading to a global CI timeout). To get rid of the overhead suspend the signal helper process for the duration of the system() call, which is provided already by igt_system(). Cc: Chris Wilson Cc: Daniel Vetter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103160 Signed-off-by: Imre Deak Reviewed-by: Chris Wilson --- lib/igt_aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/igt_aux.c') diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 8dde9a12..ee53559c 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -794,7 +794,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state) */ snprintf(cmd, sizeof(cmd), "rtcwake -n -s %d -m %s " SQUELCH, delay, suspend_state_name[state]); - ret = system(cmd); + ret = igt_system(cmd); igt_require_f(ret == 0, "rtcwake test failed with %i\n" "This failure could mean that something is wrong with " "the rtcwake tool or how your distro is set up.\n", @@ -802,7 +802,7 @@ static void suspend_via_rtcwake(enum igt_suspend_state state) snprintf(cmd, sizeof(cmd), "rtcwake -s %d -m %s ", delay, suspend_state_name[state]); - ret = system(cmd); + ret = igt_system(cmd); igt_assert_f(ret == 0, "rtcwake failed with %i\n" "Check dmesg for further details.\n", -- cgit v1.2.3