[igt-dev] [PATCH 1/2] tests/kms_invalid_mode : Convert tests to dynamic
Petri Latvala
petri.latvala at intel.com
Fri May 20 06:03:22 UTC 2022
On Fri, May 20, 2022 at 06:42:25AM +0530, Nidhi Gupta wrote:
> Modified kms_invalid_mode to include dynamic test cases
> for better reporting of the results.
>
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
> tests/kms_invalid_mode.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
> index bb92a94e..bb524037 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -296,8 +296,11 @@ static const struct {
>
> static data_t data;
>
> -igt_main
> -{
> +igt_main {
> +
> +igt_output_t *output;
> +enum pipe pipe;
> +
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>
> @@ -312,9 +315,15 @@ igt_main
> }
>
> for (int i = 0; i < ARRAY_SIZE(subtests); i++) {
> - igt_subtest(subtests[i].name) {
> - data.adjust_mode = subtests[i].adjust_mode;
> - test(&data);
> + igt_subtest_with_dynamic(subtests[i].name) {
> + for_each_pipe(&data.display, pipe) {
> + for_each_valid_output_on_pipe(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> + data.adjust_mode = subtests[i].adjust_mode;
> + test(&data);
> + }
> + }
What is the goal of this change? All this does is repeat the _same_
operations n number of times.
--
Petri Latvala
More information about the igt-dev
mailing list