From patchwork Wed Nov 28 22:19:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@freedesktop.org X-Patchwork-Id: 10703455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA87216B1 for ; Wed, 28 Nov 2018 22:19:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7FD72D9CE for ; Wed, 28 Nov 2018 22:19:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BADF52DA78; Wed, 28 Nov 2018 22:19:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6F5102D9CE for ; Wed, 28 Nov 2018 22:19:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2651C6E375; Wed, 28 Nov 2018 22:19:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 820246E375 for ; Wed, 28 Nov 2018 22:19:25 +0000 (UTC) Received: by culpepper.freedesktop.org (Postfix, from userid 33) id 78DF872162; Wed, 28 Nov 2018 22:19:25 +0000 (UTC) From: bugzilla-daemon@freedesktop.org To: dri-devel@lists.freedesktop.org Subject: [Bug 108891] Test enumeration becomes funky on some tests due to fd FILE* stream change Date: Wed, 28 Nov 2018 22:19:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DRI X-Bugzilla-Component: IGT X-Bugzilla-Version: XOrg git X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chris@chris-wilson.co.uk X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: medium X-Bugzilla-Assigned-To: dri-devel@lists.freedesktop.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP https://bugs.freedesktop.org/show_bug.cgi?id=108891 --- Comment #3 from Chris Wilson --- diff --git a/lib/igt_core.c b/lib/igt_core.c index e0989f53..bd600762 100644 --- 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(); } }