[Intel-gfx] [PATCH i-g-t v3 4/7] tests/kms_plane_scaling: Add TEST_ONLY flag

Mika Kahola mika.kahola at intel.com
Wed Feb 1 13:18:06 UTC 2017


Add TEST_ONLY flag to test atomic scaling without
actually committing the changes.

v2: Create subtests with TEST_ONLY flag and one without

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_plane_scaling.c | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 18ba86c..4e0d16d 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -310,21 +310,34 @@ static void test_plane_scaling(data_t *d)
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 }
 
-igt_simple_main
+igt_main
 {
 	data_t data = {};
 
 	igt_skip_on_simulation();
 
+	igt_fixture {
+		data.drm_fd = drm_open_driver(DRIVER_INTEL);
+		igt_require_pipe_crc();
+		igt_display_init(&data.display, data.drm_fd);
+		data.devid = intel_get_drm_devid(data.drm_fd);
 
-	data.drm_fd = drm_open_driver(DRIVER_INTEL);
-	igt_require_pipe_crc();
-	igt_display_init(&data.display, data.drm_fd);
-	data.devid = intel_get_drm_devid(data.drm_fd);
+		data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
+	}
 
-	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
+	igt_subtest("force-atomic-test") {
+		data.display.force_test_atomic = true;
+		test_plane_scaling(&data);
+	}
 
-	test_plane_scaling(&data);
+	igt_subtest("normal") {
+		data.display.force_test_atomic = false;
+		test_plane_scaling(&data);
+	}
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
 
-	igt_display_fini(&data.display);
+	igt_exit();
 }
-- 
2.7.4



More information about the Intel-gfx mailing list