Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
	jani.saarinen@intel.com, ashutosh.dixit@intel.com
Subject: Re: [PATCH v2] tests/intel/xe_exec_reset: Explicitly declare exec
Date: Tue, 15 Oct 2024 09:50:10 +0200	[thread overview]
Message-ID: <fe1eb612-2d67-408c-adad-5770a7ea8989@linux.intel.com> (raw)
In-Reply-To: <20241014220011.264642-1-jonathan.cavitt@intel.com>


On 10/15/2024 12:00 AM, Jonathan Cavitt wrote:
> In the gt-reset-stress subtest, we define a drm_xe_exec exec without
> declaring any of its variable values.  We then define some of the struct
> values separately later in execution.  Instead of doing this, we should
> explicitly declare exec to equal a new struct with the assigned values
> initialized during construction.  This prevents any values from being
> assigned garbage data during execution.
>
> v2: Define assigned variables as a part of declaration, rather than
> separately later during exeuction. (Dixit)
>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: Jani Saarinen <jani.saarinen@intel.com>
> CC: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  tests/intel/xe_exec_reset.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
> index b5d5f43eab..43ef1e3345 100644
> --- a/tests/intel/xe_exec_reset.c
> +++ b/tests/intel/xe_exec_reset.c
> @@ -628,7 +628,10 @@ static void submit_jobs(struct gt_thread_data *t)
>  			.engine_instance = 0,
>  			.gt_id = 0,
>  		};
> -		struct drm_xe_exec exec;
> +		struct drm_xe_exec exec = {
> +			.address = addr,
> +			.num_batch_buffer = 1,
> +		};
>  		int ret;
>  
>  		/* GuC IDs can get exhausted */
> @@ -636,8 +639,6 @@ static void submit_jobs(struct gt_thread_data *t)
>  		if (ret)
>  			continue;
>  
> -		exec.address = addr;
> -		exec.num_batch_buffer = 1;
>  		xe_exec(fd, &exec);
>  		xe_exec_queue_destroy(fd, exec.exec_queue_id);
>  	}

  parent reply	other threads:[~2024-10-15  7:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 22:00 [PATCH v2] tests/intel/xe_exec_reset: Explicitly declare exec Jonathan Cavitt
2024-10-14 22:30 ` ✓ Fi.CI.BAT: success for tests/intel/xe_exec_reset: Explicitly declare exec (rev3) Patchwork
2024-10-15  0:04 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-16  9:14   ` Kamil Konieczny
2024-10-15  7:50 ` Nirmoy Das [this message]
2024-10-15 16:48 ` ✗ CI.xeFULL: " Patchwork
2024-10-16  9:17   ` Kamil Konieczny
2024-10-16  8:39 ` ✓ CI.xeBAT: success " Patchwork
2024-10-16 10:26 ` ✗ Fi.CI.BAT: failure for tests/intel/xe_exec_reset: Explicitly declare exec (rev4) Patchwork

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=fe1eb612-2d67-408c-adad-5770a7ea8989@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=alex.zuo@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=jonathan.cavitt@intel.com \
    --cc=saurabhg.gupta@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