From patchwork Mon Feb 6 11:04:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Latvala X-Patchwork-Id: 9557549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 324CC60236 for ; Mon, 6 Feb 2017 11:05:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AD2B27F9F for ; Mon, 6 Feb 2017 11:05:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5C9027FA7; Mon, 6 Feb 2017 11:05:26 +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=-4.2 required=2.0 tests=BAYES_00, 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 7C2D627F9F for ; Mon, 6 Feb 2017 11:05:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E9206E3C0; Mon, 6 Feb 2017 11:05:25 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from johanna4.inet.fi (mta-out1.inet.fi [62.71.2.234]) by gabe.freedesktop.org (Postfix) with ESMTP id 249216E3C0 for ; Mon, 6 Feb 2017 11:05:24 +0000 (UTC) RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 215 2015-05-29_17-31-22 60ae4a1b4d01d14f868b20a55aced8d7df7b2e28 RazorGate-KAS: Lua profiles 78662 [Jun 02 2015] RazorGate-KAS: Method: none Received: from hufflepuff.adrinael.net (84.250.112.128) by johanna4.inet.fi (9.0.002.03-2-gbe5d057) id 5894632C00726539; Mon, 6 Feb 2017 13:05:23 +0200 Received: from adrinael by hufflepuff.adrinael.net with local (Exim 4.84_2) (envelope-from ) id 1cah6p-0000ZI-Dw; Mon, 06 Feb 2017 13:05:23 +0200 From: Petri Latvala To: intel-gfx@lists.freedesktop.org Date: Mon, 6 Feb 2017 13:04:58 +0200 Message-Id: <1486379098-2127-1-git-send-email-petri.latvala@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20170206103944.GB12434@nuc-i3427.alporthouse.com> References: <20170206103944.GB12434@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH i-g-t] tests/gem_exec_reloc: Don't call igt_(dis)allow_hang outside fixtures X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP gem_exec_reloc --list-subtests breaks otherwise. v2: use igt_subtest_group (Chris) CC: Chris Wilson Signed-off-by: Petri Latvala Reviewed-by: Chris Wilson --- tests/gem_exec_reloc.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/gem_exec_reloc.c b/tests/gem_exec_reloc.c index 78bb59c..8356d85 100644 --- a/tests/gem_exec_reloc.c +++ b/tests/gem_exec_reloc.c @@ -550,19 +550,25 @@ igt_main for (f = flags; f->name; f++) { igt_hang_t hang; - if (f->flags & HANG) - hang = igt_allow_hang(fd, 0, 0); - - for (m = modes; m->name; m++) { - igt_subtest_f("%s%s%s", - f->basic ? "basic-" : "", - m->name, - f->name) - basic_reloc(fd, m->before, m->after, f->flags); + igt_subtest_group { + igt_fixture { + if (f->flags & HANG) + hang = igt_allow_hang(fd, 0, 0); + } + + for (m = modes; m->name; m++) { + igt_subtest_f("%s%s%s", + f->basic ? "basic-" : "", + m->name, + f->name) + basic_reloc(fd, m->before, m->after, f->flags); + } + + igt_fixture { + if (f->flags & HANG) + igt_disallow_hang(fd, hang); + } } - - if (f->flags & HANG) - igt_disallow_hang(fd, hang); } igt_subtest("basic-softpin")