Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Nidhi Gupta <nidhi1.gupta@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: petri.latvala@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_invalid_mode: Test Cleanup
Date: Fri, 24 Jun 2022 10:39:38 +0530	[thread overview]
Message-ID: <859c6652-d4b8-dd8d-2860-e2fbe884d196@intel.com> (raw)
In-Reply-To: <20220623235728.5749-3-nidhi1.gupta@intel.com>

On Fri-24-06-2022 05:27 am, Nidhi Gupta wrote:
> Sanitize the system state before starting the subtest.
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
>   tests/kms_invalid_mode.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
> index 7e1f683b..423d360f 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -184,9 +184,9 @@ test_output(data_t *data)
>   	igt_output_t *output = data->output;
>   	drmModeModeInfo mode;
>   	struct igt_fb fb;
> -	int ret;
> -	uint32_t crtc_id;
>   
> +	igt_display_reset(&data->display);
> +	igt_output_set_pipe(output, data->pipe);
>   	/*
>   	 * FIXME test every mode we have to be more
>   	 * sure everything is really getting rejected?

mode = *igt_output_get_mode(output);
igt_require(data->adjust_mode(data, &mode));

As we are adjusting the mode, I guess we must override with the updated one.

hmm, we are always trying with default mode. How about trying with few 
override modes?

> @@ -203,12 +203,7 @@ test_output(data_t *data)
>   
>   	kmstest_unset_all_crtcs(data->drm_fd, data->res);

This is redundant to igt_display_reset(), also it'll unset all crtcs 
before commit, so we'll endup to commit with out crtc. Please drop it.

Also, data->res is no more required as we are using IGT wrappers.

And please add igt_display_require_output() to igt_fixture.

>   
> -	crtc_id = data->display.pipes[data->pipe].crtc_id;
> -
> -	ret = drmModeSetCrtc(data->drm_fd, crtc_id,
> -			     fb.fb_id, 0, 0,
> -			     &output->id, 1, &mode);
> -	igt_assert_lt(ret, 0);
> +	igt_display_commit(&data->display);

Cleanup is required here.
igt_output_set_pipe(output, PIPE_NONE);

>   
>   	igt_remove_fb(data->drm_fd, &fb);
>   }

  reply	other threads:[~2022-06-24  5:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 23:57 [igt-dev] [PATCH i-g-t 0/2] tests/kms_invalid_mode: Test Cleanup Nidhi Gupta
2022-06-23 23:57 ` [igt-dev] [PATCH i-g-t 1/2] tests/kms_invalid_mode: Convert tests to dynamic Nidhi Gupta
2022-06-24  5:09   ` Modem, Bhanuprakash
2022-06-23 23:57 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_invalid_mode: Test Cleanup Nidhi Gupta
2022-06-24  5:09   ` Modem, Bhanuprakash [this message]
2022-06-24  0:55 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_invalid_mode: Test Cleanup (rev2) Patchwork
2022-06-27 16:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-06-28 13:32 [igt-dev] [PATCH i-g-t 0/2] tests/kms_invalid_mode: Test Cleanup Nidhi Gupta
2022-06-28 13:32 ` [igt-dev] [PATCH i-g-t 2/2] " Nidhi Gupta
2022-06-28 15:35   ` Nidhi Gupta
2022-06-30 14:23     ` Nidhi Gupta
2022-07-01  6:39       ` Modem, Bhanuprakash
2022-07-07 12:26       ` Nidhi Gupta
2022-06-27  9:54 [igt-dev] [PATCH i-g-t 0/2] " Nidhi Gupta
2022-06-27  9:54 ` [igt-dev] [PATCH i-g-t 2/2] " Nidhi Gupta
2022-06-27  7:07 [igt-dev] [PATCH i-g-t 0/2] " Nidhi Gupta
2022-06-27  7:07 ` [igt-dev] [PATCH i-g-t 2/2] " Nidhi Gupta
2022-06-27  7:31   ` Modem, Bhanuprakash
2022-06-22 15:48 [igt-dev] [PATCH i-g-t 0/2] " Nidhi Gupta
2022-06-22 15:48 ` [igt-dev] [PATCH i-g-t 2/2] " Nidhi Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=859c6652-d4b8-dd8d-2860-e2fbe884d196@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nidhi1.gupta@intel.com \
    --cc=petri.latvala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox