From patchwork Fri Feb 19 12:34:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 8360441 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 950049F727 for ; Fri, 19 Feb 2016 12:28:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDC8A20451 for ; Fri, 19 Feb 2016 12:28:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A5DD220452 for ; Fri, 19 Feb 2016 12:28:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C202D6EF1F; Fri, 19 Feb 2016 12:28:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 516B26EF1F for ; Fri, 19 Feb 2016 12:28:14 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 19 Feb 2016 04:28:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,470,1449561600"; d="scan'208";a="50844212" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.104.199]) by fmsmga004.fm.intel.com with ESMTP; 19 Feb 2016 04:28:14 -0800 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Fri, 19 Feb 2016 14:34:51 +0200 Message-Id: <1455885293-10964-2-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455885293-10964-1-git-send-email-gabriel.feceoru@intel.com> References: <1455885293-10964-1-git-send-email-gabriel.feceoru@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When no display is connected all kms_plane subtests pass although no testing is done. Change it by reporting the subtests as skipped. Signed-off-by: Gabriel Feceoru --- tests/kms_plane.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/kms_plane.c b/tests/kms_plane.c index b7a42c6..d8bb484 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -224,13 +224,18 @@ test_plane_position(data_t *data, enum pipe pipe, enum igt_plane plane, unsigned int flags) { igt_output_t *output; + int connected_outs = 0; igt_skip_on(pipe >= data->display.n_pipes); igt_skip_on(plane >= data->display.pipes[pipe].n_planes); - for_each_connected_output(&data->display, output) + for_each_connected_output(&data->display, output) { test_plane_position_with_output(data, pipe, plane, output, flags); + connected_outs++; + } + + igt_skip_on(connected_outs == 0); } /* @@ -346,13 +351,18 @@ test_plane_panning(data_t *data, enum pipe pipe, enum igt_plane plane, unsigned int flags) { igt_output_t *output; + int connected_outs = 0; igt_skip_on(pipe >= data->display.n_pipes); igt_skip_on(plane >= data->display.pipes[pipe].n_planes); - for_each_connected_output(&data->display, output) + for_each_connected_output(&data->display, output) { test_plane_panning_with_output(data, pipe, plane, output, flags); + connected_outs++; + } + + igt_skip_on(connected_outs == 0); } static void