Return-Path: Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 24A5C10E3AB for ; Tue, 28 Jun 2022 13:39:09 +0000 (UTC) From: Mohammed Thasleem To: igt-dev@lists.freedesktop.org Date: Tue, 28 Jun 2022 19:05:53 +0530 Message-Id: <20220628133554.37768-2-mohammed.thasleem@intel.com> In-Reply-To: <20220628133554.37768-1-mohammed.thasleem@intel.com> References: <20220628133554.37768-1-mohammed.thasleem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH v3 1/2] tests/i915/kms_mmap_write_crc: Create dynamic subtests List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nidhi1.gupta@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Modified kms_mmap_write_crc to include dynamic test cases. v2: moved for loop to after igt_subtest_with_dynamic. v3: added break and moved for loop back in igt_dynamic_f. Signed-off-by: Mohammed Thasleem --- tests/i915/kms_mmap_write_crc.c | 40 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c index b17e5fdb..50aa434d 100644 --- a/tests/i915/kms_mmap_write_crc.c +++ b/tests/i915/kms_mmap_write_crc.c @@ -213,23 +213,9 @@ static void cleanup_crtc(data_t *data) static void run_test(data_t *data) { - igt_display_t *display = &data->display; - igt_output_t *output; - enum pipe pipe; - - for_each_pipe_with_valid_output(display, pipe, output) { - data->output = output; - data->pipe = pipe; - - prepare_crtc(data); - test(data); - cleanup_crtc(data); - - /* once is enough */ - return; - } - - igt_skip("no valid crtc/connector combinations found\n"); + prepare_crtc(data); + test(data); + cleanup_crtc(data); } struct igt_helper_process hog; @@ -270,6 +256,8 @@ static data_t data; igt_main_args("n", NULL, NULL, opt_handler, NULL) { int i; + igt_output_t *output; + enum pipe pipe; igt_fixture { data.drm_fd = drm_open_driver_master(DRIVER_INTEL); @@ -286,10 +274,20 @@ igt_main_args("n", NULL, NULL, opt_handler, NULL) } igt_describe("Tests that caching mode has become UC/WT and flushed using mmap write"); - igt_subtest("main") { - igt_info("Using %d rounds for the test\n", ROUNDS); - for (i = 0; i < ROUNDS; i++) - run_test(&data); + igt_info("Using %d rounds for each pipe in the test\n", ROUNDS); + + igt_subtest_with_dynamic("main") { + for_each_pipe_with_valid_output(&data.display, pipe, output) { + igt_dynamic_f("%s-pipe-%s", igt_output_name(output), + kmstest_pipe_name(pipe)) { + data.output = output; + data.pipe = pipe; + for (i = 0; i < ROUNDS; i++) + run_test(&data); + } + /* once is enough */ + break; + } } igt_fixture { -- 2.25.1