summaryrefslogtreecommitdiff
path: root/lib/tests/igt_fork.c
AgeCommit message (Collapse)Author
2019-02-21lib/tests: Use ARRAY_SIZEDaniel Vetter
Except in igt_simulation.c where we use tricks and intentionally only want part of the array in some cases. Suggested-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-20lib/tests: add internal_assert_wexited/wsignaledDaniel Vetter
And convert everything over. igt_segfault needed a bit of care to differentiate between a real death-by-signal and igt_exit mapping a child process signal death to an exit code. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-02-20lib/tests: Add header for common helpersDaniel Vetter
Start with internal_assert, more will follow. While at it, use internal_assert everywhere (except where we check exit status, those will get dedicated assert checks). Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-15lib: Make sure we leak no child processesDaniel Vetter
There's a lot more ways to leak children than igt_fork, some even handrolled. So check for that. Also have a nice littel testcase for that too. v2: Don't hang if there's a leaked child process (Chris). Has the added benefit that my library unit test also gets faster! v3: Rebase. Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-15tests/i915_missed_irq: Don't leave the hang detector hangingDaniel Vetter
Spotted by my new "are there any child processes left?" check in igt_exit - we need to put all the igt_require before we start any real test logic. v2: Rebase. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-15lib/tests: make sure igt_skip in igt_fork is forbiddenDaniel Vetter
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: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-02-15lib/tests: Check that igt_assert forwards correctly through igt_forkDaniel Vetter
Note that without the igt_waitchildren nothing at all gets forwarded, maybe we should check for left-behind children somewhere on subtest exit. v2: Drop NIH exit status handling (Chris). Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>