lib/drmtest: create helpers for forking helper threads

The upshot is that we can share the logic to make sure the helpers
are all properly stoved again in a 2nd step.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-09-10 15:46:08 +02:00
parent 2096649053
commit edd723457c
2 changed files with 60 additions and 29 deletions
+9
View File
@@ -221,6 +221,15 @@ bool __igt_fork(void);
for (; __igt_fork(); exit(0))
void igt_waitchildren(void);
struct igt_helper_process {
bool running;
pid_t pid;
};
bool __igt_fork_helper(struct igt_helper_process *proc);
void igt_stop_helper(struct igt_helper_process *proc);
#define igt_fork_helper(proc) \
for (; __igt_fork_helper(proc); exit(0))
/* check functions which auto-skip tests by calling igt_skip() */
void gem_require_caching(int fd);
static inline void gem_require_ring(int fd, int ring_id)