diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 14:20:43 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-10 14:20:43 +0200 |
commit | ffdece38e2b6aec64b0d96e83cd2324c035b1867 (patch) | |
tree | 23da933179f26774c43dc47f6da88bc27b21f9c6 /lib | |
parent | 8a9b275b96f1ea5637d21e4568647dcb7fed98f2 (diff) |
tests/gem_suspend: test debugfs/sysfs reads while s/r
Just a very quick hack cobbled together with /bin/sh and exec. We
can't use system since that does stupid things with singals ... Still
we need to whack the child process pretty hard to get rid of it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/drmtest.c | 3 | ||||
-rw-r--r-- | lib/drmtest.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index 3cec956e..2660af72 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -1080,7 +1080,8 @@ void igt_stop_helper(struct igt_helper_process *proc) assert(proc->running); - assert(kill(proc->pid, SIGQUIT) == 0); + assert(kill(proc->pid, + proc->use_SIGKILL ? SIGKILL : SIGQUIT) == 0); while (waitpid(proc->pid, &status, 0) == -1 && errno == -EINTR) ; diff --git a/lib/drmtest.h b/lib/drmtest.h index dac12fac..ff2827d3 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -243,6 +243,7 @@ void igt_waitchildren(void); struct igt_helper_process { bool running; + bool use_SIGKILL; pid_t pid; int id; }; |