All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_chv_cursor_fail: Skip when the pipe doesn't exist
@ 2016-01-08 19:04 ville.syrjala
  0 siblings, 0 replies; only message in thread
From: ville.syrjala @ 2016-01-08 19:04 UTC (permalink / raw
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks like I fumbled things when I made kms_chv_cursor_fail iterate
over all pipes. It fails to check that the pipe actually exists, and
so fails on < 3 pipe platforms. Add the necessary checks to skip
on non-existing pipes.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_chv_cursor_fail.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
index 2ccdd4106597..83af07f9b968 100644
--- a/tests/kms_chv_cursor_fail.c
+++ b/tests/kms_chv_cursor_fail.c
@@ -394,24 +394,28 @@ int main(int argc, char **argv)
 			igt_subtest_f("pipe-%s-%dx%d-left-edge",
 				      kmstest_pipe_name(data.pipe),
 				      data.curw, data.curh) {
+				igt_require(data.pipe < data.display.n_pipes);
 				igt_require(data.curw <= max_curw && data.curh <= max_curh);
 				test_crtc(&data, EDGE_LEFT);
 			}
 			igt_subtest_f("pipe-%s-%dx%d-right-edge",
 				      kmstest_pipe_name(data.pipe),
 				      data.curw, data.curh) {
+				igt_require(data.pipe < data.display.n_pipes);
 				igt_require(data.curw <= max_curw && data.curh <= max_curh);
 				test_crtc(&data, EDGE_RIGHT);
 			}
 			igt_subtest_f("pipe-%s-%dx%d-top-edge",
 				      kmstest_pipe_name(data.pipe),
 				      data.curw, data.curh) {
+				igt_require(data.pipe < data.display.n_pipes);
 				igt_require(data.curw <= max_curw && data.curh <= max_curh);
 				test_crtc(&data, EDGE_TOP);
 			}
 			igt_subtest_f("pipe-%s-%dx%d-bottom-edge",
 				      kmstest_pipe_name(data.pipe),
 				      data.curw, data.curh) {
+				igt_require(data.pipe < data.display.n_pipes);
 				igt_require(data.curw <= max_curw && data.curh <= max_curh);
 				test_crtc(&data, EDGE_BOTTOM);
 			}
-- 
2.4.10

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-08 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 19:04 [PATCH i-g-t] tests/kms_chv_cursor_fail: Skip when the pipe doesn't exist ville.syrjala

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.