From patchwork Thu Jul 12 07:31:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10521135 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 D1B1D603D7 for ; Thu, 12 Jul 2018 07:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9104828562 for ; Thu, 12 Jul 2018 07:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83B5C285A8; Thu, 12 Jul 2018 07:31:53 +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, 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 04BD228562 for ; Thu, 12 Jul 2018 07:31:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BE506EE59; Thu, 12 Jul 2018 07:31:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66FFA6ECC6; Thu, 12 Jul 2018 07:31:50 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 12327764-1500050 for multiple; Thu, 12 Jul 2018 08:31:35 +0100 From: Chris Wilson To: igt-dev@lists.freedesktop.org Date: Thu, 12 Jul 2018 08:31:42 +0100 Message-Id: <20180712073142.21364-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.18.0 Subject: [Intel-gfx] [PATCH i-g-t] igt/kms_vblank: Check if hangs are allowed X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Before running a hang test, check if we can inject a hang and expect recover to work. If we can't control a hang, skip the subtest. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä --- tests/kms_vblank.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c index 2bee49de5..508c0fa03 100644 --- a/tests/kms_vblank.c +++ b/tests/kms_vblank.c @@ -442,10 +442,14 @@ static void run_subtests_for_pipe(data_t *data) igt_subtest_f("pipe-%s-%s-%s-hang", kmstest_pipe_name(data->pipe), f->name, m->name) { + igt_hang_t hang; + + hang = igt_allow_hang(data->display.drm_fd, 0, 0); for_each_valid_output_on_pipe(&data->display, data->pipe, data->output) { data->flags = m->flags; run_test(data, f->func); } + igt_disallow_hang(data->display.drm_fd, hang); } } }