All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Feceoru <gabriel.feceoru@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs
Date: Fri, 19 Feb 2016 14:34:51 +0200	[thread overview]
Message-ID: <1455885293-10964-2-git-send-email-gabriel.feceoru@intel.com> (raw)
In-Reply-To: <1455885293-10964-1-git-send-email-gabriel.feceoru@intel.com>

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 <gabriel.feceoru@intel.com>
---
 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
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-19 12:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
2016-02-19 12:34 ` Gabriel Feceoru [this message]
2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
2016-02-19 13:25   ` Marius Vlad
2016-02-26 11:21   ` [PATCH i-g-t v2 " Gabriel Feceoru
2016-02-19 12:34 ` [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied Gabriel Feceoru
2016-02-26 12:59   ` [PATCH i-g-t v2 " Gabriel Feceoru
2016-03-29 15:06 ` [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455885293-10964-2-git-send-email-gabriel.feceoru@intel.com \
    --to=gabriel.feceoru@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.