All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v5] IGT cleanup
@ 2022-03-10  7:10 Nidhi Gupta
  2022-03-10  7:34 ` [igt-dev] ✗ Fi.CI.BUILD: failure for IGT cleanup (rev5) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nidhi Gupta @ 2022-03-10  7:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta

Before starting the next subtest, clean up the states to default
values, those are assumed by other tests.

v2: And also before running the subtest we need to sanitize the system state
to default, since we can't trust the state of previous subtest, used
igt_display_reset() to sanitize the state. (Bhanuprakash Modem)

v3: Added dynamic subtests (Karthik)

Below tests are modified:
	tests/kms_concurrent.c
	tests/kms_sequence.c

Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/kms_concurrent.c | 43 +++++++++++++++++++++---------------------
 tests/kms_sequence.c   | 11 +++++++----
 2 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 1b8f4b04..5efe422b 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -82,7 +82,8 @@ static void test_fini(data_t *data, enum pipe pipe, int n_planes,
 	}
 
 	/* reset the constraint on the pipe */
-	igt_output_set_pipe(output, PIPE_ANY);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 
 	free(data->plane);
 	data->plane = NULL;
@@ -278,35 +279,30 @@ test_resolution_with_output(data_t *data, enum pipe pipe, int max_planes, igt_ou
 static void
 run_test(data_t *data, enum pipe pipe, igt_output_t *output)
 {
-	int connected_outs;
-	int n_planes = data->display.pipes[pipe].n_planes;
+	int n_planes;
+
+	igt_display_reset(&data->display);
+	n_planes = data->display.pipes[pipe].n_planes;
 
 	if (!opt.user_seed)
 		opt.seed = time(NULL);
 
-	connected_outs = 0;
-	for_each_valid_output_on_pipe(&data->display, pipe, output) {
-		igt_info("Testing resolution with connector %s using pipe %s with seed %d\n",
-			 igt_output_name(output), kmstest_pipe_name(pipe), opt.seed);
-
-		srand(opt.seed);
+	igt_info("Testing resolution with connector %s using pipe %s with seed %d\n",
+		 igt_output_name(output), kmstest_pipe_name(pipe), opt.seed);
 
-		test_init(data, pipe, n_planes, output);
-
-		igt_fork(child, 1) {
-			test_plane_position_with_output(data, pipe, n_planes, output);
-		}
+	srand(opt.seed);
 
-		test_resolution_with_output(data, pipe, n_planes, output);
+	test_init(data, pipe, n_planes, output);
 
-		igt_waitchildren();
+	igt_fork(child, 1) {
+		test_plane_position_with_output(data, pipe, n_planes, output);
+	}
 
-		test_fini(data, pipe, n_planes, output);
+	test_resolution_with_output(data, pipe, n_planes, output);
 
-		connected_outs++;
-	}
+	igt_waitchildren();
 
-	igt_skip_on(connected_outs == 0);
+	test_fini(data, pipe, n_planes, output);
 }
 
 static void
@@ -316,6 +312,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
 
 	igt_fixture {
 		int valid_tests = 0;
+		igt_display_reset(&data->display);
 
 		igt_require_pipe(&data->display, pipe);
 		igt_require(data->display.pipes[pipe].n_planes > 0);
@@ -328,9 +325,11 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
 
 	igt_describe("Test atomic mode setting concurrently with multiple planes and screen "
 		     "resolution.");
-	igt_subtest_f("pipe-%s", kmstest_pipe_name(pipe))
+	igt_subtest_with_dynamic("mode-setting-concurrently-with-multiple-planes-and-screen-resolution") {
 		for_each_valid_output_on_pipe(&data->display, pipe, output)
-			run_test(data, pipe, output);
+			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
+				run_test(data, pipe, output);
+	}
 }
 
 static int opt_handler(int option, int option_index, void *input)
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index 9c287480..569ea1d9 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -74,9 +74,12 @@ static double elapsed(const struct timespec *start,
 static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
 {
 	drmModeModeInfo *mode;
-	igt_display_t *display = &data->display;
 	igt_plane_t *primary;
-
+	igt_display_t *display;
+	
+	igt_display_reset(&data->display);
+	display = &data->display;
+	
 	/* select the pipe we want to use */
 	igt_output_set_pipe(output, data->pipe);
 
@@ -109,8 +112,8 @@ static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, NULL);
 
-	igt_output_set_pipe(output, PIPE_ANY);
-	igt_display_commit(display);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 }
 
 static int crtc_get_sequence(int fd, struct drm_crtc_get_sequence *cgs)
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for IGT cleanup (rev5)
  2022-03-10  7:10 [igt-dev] [PATCH i-g-t v5] IGT cleanup Nidhi Gupta
@ 2022-03-10  7:34 ` Patchwork
  2022-03-10  7:43 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
  2022-03-11 12:30 ` [igt-dev] [PATCH i-g-t v5] IGT cleanup Kamil Konieczny
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2022-03-10  7:34 UTC (permalink / raw)
  To: Nidhi Gupta; +Cc: igt-dev

== Series Details ==

Series: IGT cleanup (rev5)
URL   : https://patchwork.freedesktop.org/series/100801/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
82306f1903c0fee8371f43a156d8b63163ca61c1 lib/intel_mmio: Fix mmapped resources not unmapped on fini

292/324 testcase check amdgpu/amd_basic               OK               0.18s
293/324 testcase check amdgpu/amd_bypass              OK               0.17s
294/324 testcase check amdgpu/amd_color               OK               0.17s
295/324 testcase check amdgpu/amd_cs_nop              OK               0.16s
296/324 testcase check amdgpu/amd_hotplug             OK               0.16s
297/324 testcase check amdgpu/amd_info                OK               0.16s
298/324 testcase check amdgpu/amd_prime               OK               0.15s
299/324 testcase check amdgpu/amd_max_bpc             OK               0.15s
300/324 testcase check amdgpu/amd_module_load         OK               0.15s
301/324 testcase check amdgpu/amd_mem_leak            OK               0.14s
302/324 testcase check amdgpu/amd_link_settings       OK               0.13s
303/324 testcase check amdgpu/amd_vrr_range           OK               0.12s
304/324 testcase check amdgpu/amd_mode_switch         OK               0.11s
305/324 testcase check amdgpu/amd_dp_dsc              OK               0.11s
306/324 testcase check amdgpu/amd_psr                 OK               0.11s
307/324 testcase check amdgpu/amd_plane               OK               0.10s
308/324 testcase check amdgpu/amd_ilr                 OK               0.10s
309/324 runner_json                                   OK               0.09s
310/324 assembler test/mov                            OK               0.08s
311/324 assembler test/frc                            OK               0.08s
312/324 assembler test/regtype                        OK               0.08s
313/324 assembler test/rndd                           OK               0.07s
314/324 assembler test/rndu                           OK               0.07s
315/324 assembler test/rnde                           OK               0.06s
316/324 assembler test/rnde-intsrc                    OK               0.06s
317/324 assembler test/rndz                           OK               0.05s
318/324 assembler test/lzd                            OK               0.05s
319/324 assembler test/not                            OK               0.04s
320/324 assembler test/immediate                      OK               0.03s
321/324 lib igt_nesting                               OK               2.27s
322/324 lib igt_fork                                  OK               2.79s
323/324 runner                                        OK               4.64s
324/324 testcase check gem_concurrent_all             OK               5.44s

Summary of Failures:

 35/324 testcase check kms_concurrent                 FAIL             0.24s   exit status 1


Ok:                 320 
Expected Fail:      3   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /home/cidrm/igt-gpu-tools/build/meson-logs/testlog.txt
FAILED: meson-test 
/usr/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: warning for IGT cleanup (rev5)
  2022-03-10  7:10 [igt-dev] [PATCH i-g-t v5] IGT cleanup Nidhi Gupta
  2022-03-10  7:34 ` [igt-dev] ✗ Fi.CI.BUILD: failure for IGT cleanup (rev5) Patchwork
@ 2022-03-10  7:43 ` Patchwork
  2022-03-11 12:30 ` [igt-dev] [PATCH i-g-t v5] IGT cleanup Kamil Konieczny
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2022-03-10  7:43 UTC (permalink / raw)
  To: Nidhi Gupta; +Cc: igt-dev

== Series Details ==

Series: IGT cleanup (rev5)
URL   : https://patchwork.freedesktop.org/series/100801/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/528192 for the overview.

test:ninja-test has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/19604116):
  320/324 assembler test/rnde-intsrc              OK       0.05 s 
  321/324 assembler test/rndz                     OK       0.03 s 
  322/324 assembler test/lzd                      OK       0.03 s 
  323/324 assembler test/not                      OK       0.03 s 
  324/324 assembler test/immediate                OK       0.03 s 
  
  Ok:                  320
  Expected Fail:         3
  Fail:                  1
  Unexpected Pass:       0
  Skipped:               0
  Timeout:               0
  
  Full log written to /builds/gfx-ci/igt-ci-tags/build/meson-logs/testlog.txt
  section_end:1646898107:step_script
  section_start:1646898107:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1646898107:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

test:ninja-test-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/19604117):
  Ok:                  306
  Expected Fail:         3
  Fail:                  1
  Unexpected Pass:       0
  Skipped:               0
  Timeout:               0
  
  Full log written to /builds/gfx-ci/igt-ci-tags/build/meson-logs/testlog.txt
  section_end:1646898119:step_script
  section_start:1646898119:upload_artifacts_on_failure
  Uploading artifacts for failed job
  Uploading artifacts...
  build: found 1693 matching files and directories   
  Uploading artifacts as "archive" to coordinator... 201 Created  id=19604117 responseStatus=201 Created token=n2RAtAht
  section_end:1646898129:upload_artifacts_on_failure
  section_start:1646898129:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1646898129:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

test:ninja-test-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/19604118):
  Ok:                  306
  Expected Fail:         3
  Fail:                  1
  Unexpected Pass:       0
  Skipped:               0
  Timeout:               0
  
  Full log written to /builds/gfx-ci/igt-ci-tags/build/meson-logs/testlog.txt
  section_end:1646898147:step_script
  section_start:1646898147:upload_artifacts_on_failure
  Uploading artifacts for failed job
  Uploading artifacts...
  build: found 1693 matching files and directories   
  Uploading artifacts as "archive" to coordinator... 201 Created  id=19604118 responseStatus=201 Created token=cx6gLEfW
  section_end:1646898158:upload_artifacts_on_failure
  section_start:1646898158:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1646898158:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

test:ninja-test-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/19604115):
  320/324 assembler test/rnde-intsrc              OK       0.02 s 
  321/324 assembler test/rndz                     OK       0.02 s 
  322/324 assembler test/lzd                      OK       0.02 s 
  323/324 assembler test/not                      OK       0.02 s 
  324/324 assembler test/immediate                OK       0.03 s 
  
  Ok:                  320
  Expected Fail:         3
  Fail:                  1
  Unexpected Pass:       0
  Skipped:               0
  Timeout:               0
  
  Full log written to /builds/gfx-ci/igt-ci-tags/build/meson-logs/testlog.txt
  section_end:1646898098:step_script
  section_start:1646898098:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1646898099:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

test:ninja-test-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/19604119):
  Ok:                  306
  Expected Fail:         3
  Fail:                  1
  Unexpected Pass:       0
  Skipped:               0
  Timeout:               0
  
  Full log written to /builds/gfx-ci/igt-ci-tags/build/meson-logs/testlog.txt
  section_end:1646898157:step_script
  section_start:1646898157:upload_artifacts_on_failure
  Uploading artifacts for failed job
  Uploading artifacts...
  build: found 1693 matching files and directories   
  Uploading artifacts as "archive" to coordinator... 201 Created  id=19604119 responseStatus=201 Created token=JE3z_9sy
  section_end:1646898167:upload_artifacts_on_failure
  section_start:1646898167:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1646898167:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/528192

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v5] IGT cleanup
  2022-03-10  7:10 [igt-dev] [PATCH i-g-t v5] IGT cleanup Nidhi Gupta
  2022-03-10  7:34 ` [igt-dev] ✗ Fi.CI.BUILD: failure for IGT cleanup (rev5) Patchwork
  2022-03-10  7:43 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
@ 2022-03-11 12:30 ` Kamil Konieczny
  2 siblings, 0 replies; 4+ messages in thread
From: Kamil Konieczny @ 2022-03-11 12:30 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta

Hi Nidhi,

please put "KMS" in your subject, like:
IGT KMS cleanup

Dnia 2022-03-10 at 12:40:08 +0530, Nidhi Gupta napisał(a):
> Before starting the next subtest, clean up the states to default
> values, those are assumed by other tests.
> 
> v2: And also before running the subtest we need to sanitize the system state

s/And also before/Before/

> to default, since we can't trust the state of previous subtest, used
> igt_display_reset() to sanitize the state. (Bhanuprakash Modem)
> 
> v3: Added dynamic subtests (Karthik)

Please do not mix cleanup with addition of new tests. Send it with
separate patch.

> 
> Below tests are modified:
> 	tests/kms_concurrent.c
> 	tests/kms_sequence.c
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
>  tests/kms_concurrent.c | 43 +++++++++++++++++++++---------------------
>  tests/kms_sequence.c   | 11 +++++++----
>  2 files changed, 28 insertions(+), 26 deletions(-)
> 
> diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
> index 1b8f4b04..5efe422b 100644
> --- a/tests/kms_concurrent.c
> +++ b/tests/kms_concurrent.c
> @@ -82,7 +82,8 @@ static void test_fini(data_t *data, enum pipe pipe, int n_planes,
>  	}
>  
>  	/* reset the constraint on the pipe */
> -	igt_output_set_pipe(output, PIPE_ANY);
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>  
>  	free(data->plane);
>  	data->plane = NULL;
> @@ -278,35 +279,30 @@ test_resolution_with_output(data_t *data, enum pipe pipe, int max_planes, igt_ou
>  static void
>  run_test(data_t *data, enum pipe pipe, igt_output_t *output)
>  {
> -	int connected_outs;
> -	int n_planes = data->display.pipes[pipe].n_planes;
> +	int n_planes;
> +
> +	igt_display_reset(&data->display);
> +	n_planes = data->display.pipes[pipe].n_planes;
>  
>  	if (!opt.user_seed)
>  		opt.seed = time(NULL);
>  
> -	connected_outs = 0;
> -	for_each_valid_output_on_pipe(&data->display, pipe, output) {
> -		igt_info("Testing resolution with connector %s using pipe %s with seed %d\n",
> -			 igt_output_name(output), kmstest_pipe_name(pipe), opt.seed);
> -
> -		srand(opt.seed);
> +	igt_info("Testing resolution with connector %s using pipe %s with seed %d\n",
> +		 igt_output_name(output), kmstest_pipe_name(pipe), opt.seed);
>  
> -		test_init(data, pipe, n_planes, output);
> -
> -		igt_fork(child, 1) {
> -			test_plane_position_with_output(data, pipe, n_planes, output);
> -		}
> +	srand(opt.seed);
>  
> -		test_resolution_with_output(data, pipe, n_planes, output);
> +	test_init(data, pipe, n_planes, output);
>  
> -		igt_waitchildren();
> +	igt_fork(child, 1) {
> +		test_plane_position_with_output(data, pipe, n_planes, output);
> +	}
>  
> -		test_fini(data, pipe, n_planes, output);
> +	test_resolution_with_output(data, pipe, n_planes, output);
>  
> -		connected_outs++;
> -	}
> +	igt_waitchildren();
>  
> -	igt_skip_on(connected_outs == 0);
> +	test_fini(data, pipe, n_planes, output);
>  }
>  
>  static void
> @@ -316,6 +312,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
>  
>  	igt_fixture {
>  		int valid_tests = 0;
> +		igt_display_reset(&data->display);
>  
>  		igt_require_pipe(&data->display, pipe);
>  		igt_require(data->display.pipes[pipe].n_planes > 0);
> @@ -328,9 +325,11 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
>  
>  	igt_describe("Test atomic mode setting concurrently with multiple planes and screen "
>  		     "resolution.");
> -	igt_subtest_f("pipe-%s", kmstest_pipe_name(pipe))
> +	igt_subtest_with_dynamic("mode-setting-concurrently-with-multiple-planes-and-screen-resolution") {

Do you really need such long name of subtest here ?

>  		for_each_valid_output_on_pipe(&data->display, pipe, output)
> -			run_test(data, pipe, output);
> +			igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe))
> +				run_test(data, pipe, output);
> +	}
>  }
>  
>  static int opt_handler(int option, int option_index, void *input)
> diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
> index 9c287480..569ea1d9 100644
> --- a/tests/kms_sequence.c
> +++ b/tests/kms_sequence.c
> @@ -74,9 +74,12 @@ static double elapsed(const struct timespec *start,
>  static void prepare_crtc(data_t *data, int fd, igt_output_t *output)
>  {
>  	drmModeModeInfo *mode;
> -	igt_display_t *display = &data->display;
>  	igt_plane_t *primary;
> -
> +	igt_display_t *display;
> +	
> +	igt_display_reset(&data->display);
> +	display = &data->display;
> +	
>  	/* select the pipe we want to use */
>  	igt_output_set_pipe(output, data->pipe);
>  
> @@ -109,8 +112,8 @@ static void cleanup_crtc(data_t *data, int fd, igt_output_t *output)
>  	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>  	igt_plane_set_fb(primary, NULL);
>  
> -	igt_output_set_pipe(output, PIPE_ANY);
> -	igt_display_commit(display);
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>  }
>  
>  static int crtc_get_sequence(int fd, struct drm_crtc_get_sequence *cgs)
> -- 
> 2.26.2

Regards,
Kamil

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-11 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  7:10 [igt-dev] [PATCH i-g-t v5] IGT cleanup Nidhi Gupta
2022-03-10  7:34 ` [igt-dev] ✗ Fi.CI.BUILD: failure for IGT cleanup (rev5) Patchwork
2022-03-10  7:43 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2022-03-11 12:30 ` [igt-dev] [PATCH i-g-t v5] IGT cleanup Kamil Konieczny

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.