lib/core: Handle asserts in threads
Since IGT is using magic control blocks (igt_subtest et al.) asserts jump out the them using longjmp() causing a bunch of confusing messages and occasionally crashing the whole process. This is not the behavior we want :-) With this patch: 1. simple_main, dynamic and subtest each clears the thread failure state at the start 2. each of those blocks also asserts no thread failures at the end 3. igt_assert() in non-main thread prints out the error + stacktrace and marks that we have failed thread Issue: #55 Signed-off-by:Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by:
Petri Latvala <petri.latvala@intel.com>
Showing
- lib/igt_core.c 12 additions, 0 deletionslib/igt_core.c
- lib/igt_thread.c 30 additions, 0 deletionslib/igt_thread.c
- lib/igt_thread.h 4 additions, 0 deletionslib/igt_thread.h
- lib/tests/igt_tests_common.h 22 additions, 0 deletionslib/tests/igt_tests_common.h
- lib/tests/igt_thread.c 194 additions, 0 deletionslib/tests/igt_thread.c
- lib/tests/meson.build 1 addition, 0 deletionslib/tests/meson.build
Loading
Please register or sign in to comment