[igt-dev] [PATCH i-g-t 1/9] tests/kms_lease: Add invalid planes tests

Daniel Vetter daniel.vetter at ffwll.ch
Wed Feb 20 16:25:22 UTC 2019


Test gap because we're using universal planes by default. Fix that.

Cc: Keith Packard <keithp at keithp.com>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 tests/kms_lease.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index cca424598ea7..70a96362d77a 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -573,6 +573,20 @@ static void lease_invalid_crtc(data_t *data)
 	igt_assert_eq(ret, -EINVAL);
 }
 
+static void lease_invalid_plane(data_t *data)
+{
+	lease_t lease;
+	uint32_t save_plane_id;
+	int ret;
+
+	/* Create an invalid lease */
+	save_plane_id = data->plane_id;
+	data->plane_id = 0xbaadf00d;
+	ret = make_lease(data, &lease);
+	data->plane_id = save_plane_id;
+	igt_assert_eq(ret, -EINVAL);
+}
+
 
 static void run_test(data_t *data, void (*testfunc)(data_t *))
 {
@@ -625,6 +639,7 @@ igt_main
 		{ "lease_again", lease_again },
 		{ "lease_invalid_connector", lease_invalid_connector },
 		{ "lease_invalid_crtc", lease_invalid_crtc },
+		{ "lease_invalid_plane", lease_invalid_plane },
 		{ }
 	}, *f;
 
-- 
2.14.4



More information about the igt-dev mailing list