lib: install exit handler only on success for prefault control

Otherwise we'll hit an igt_skip in the exit handler, which upsets
the new in_fixture||in_subtests checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2014-02-12 00:07:11 +01:00
parent 58633cfde4
commit 0d1084fe3f

View File

@ -1672,9 +1672,9 @@ static void enable_prefault_at_exit(int sig)
void igt_disable_prefault(void) void igt_disable_prefault(void)
{ {
igt_install_exit_handler(enable_prefault_at_exit);
igt_prefault_control(false); igt_prefault_control(false);
igt_install_exit_handler(enable_prefault_at_exit);
} }
void igt_enable_prefault(void) void igt_enable_prefault(void)