Skip to content
Snippets Groups Projects
Commit ecdf823b authored by Simona Vetter's avatar Simona Vetter
Browse files

lib/tests: make sure igt_skip in igt_fork is forbidden


Another corner case to check.

v2: Rebase. Note that we still have the SIG + 128 exit code, that's
how igt_waitchildren forwards child death to the parent's exit code.

Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent 06dbdbae
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,15 @@
char test[] = "test";
char *argv_run[] = { test };
static void igt_fork_vs_skip(void)
{
igt_fork(i, 1) {
igt_skip("skipping");
}
igt_waitchildren();
}
static void igt_fork_vs_assert(void)
{
igt_fork(i, 1) {
......@@ -79,6 +88,11 @@ int main(int argc, char **argv)
{
int ret;
/* check that igt_assert is forwarded */
ret = do_fork(igt_fork_vs_assert);
internal_assert(WEXITSTATUS(ret) == IGT_EXIT_FAILURE);
/* check that igt_skip within a fork blows up */
ret = do_fork(igt_fork_vs_skip);
internal_assert(WEXITSTATUS(ret) == SIGABRT + 128);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment