[Bug,108891] Test enumeration becomes funky on some tests due to fd FILE* stream change
diff mbox series

Message ID bug-108891-502-dqCs1CKdyS@http.bugs.freedesktop.org/
State New
Headers show
Series
  • [Bug,108891] Test enumeration becomes funky on some tests due to fd FILE* stream change
Related show

Commit Message

bugzilla-daemon@freedesktop.org Nov. 28, 2018, 10:19 p.m. UTC
https://bugs.freedesktop.org/show_bug.cgi?id=108891

--- Comment #3 from Chris Wilson <chris@chris-wilson.co.uk> ---
diff --git a/lib/igt_core.c b/lib/igt_core.c
index e0989f53..bd600762 100644

Patch
diff mbox series

--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1116,30 +1116,28 @@  void igt_fail(int exitcode)
        if (in_atexit_handler)
                _exit(IGT_EXIT_FAILURE);

-       if (!failed_one)
-               igt_exitcode = exitcode;
-
-       failed_one = true;
-
        /* Silent exit, parent will do the yelling. */
        if (test_child)
                exit(exitcode);

+       if (in_fixture) {
+               skip_subtests_henceforth = FAIL;
+               __igt_fixture_end();
+       }
+
        _igt_log_buffer_dump();

+       if (!failed_one) {
+               igt_exitcode = exitcode;
+               failed_one = true;
+       }
+
        if (in_subtest) {
                if (exitcode == IGT_EXIT_TIMEOUT)
                        exit_subtest("TIMEOUT");
                else
                        exit_subtest("FAIL");
        } else {
-               assert(igt_can_fail());
-
-               if (in_fixture) {
-                       skip_subtests_henceforth = FAIL;
-                       __igt_fixture_end();
-               }
-
                igt_exit();
        }
 }