Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] tests/xe_waitfence: Rename invalid_engine to invalid-exec_queue
Date: Thu, 11 Jan 2024 09:45:22 -0500	[thread overview]
Message-ID: <ZZ__Ag5vzCIjxQWj@intel.com> (raw)
In-Reply-To: <20240111062518.393544-2-krishnaiah.bommu@intel.com>

On Thu, Jan 11, 2024 at 11:55:16AM +0530, Bommu Krishnaiah wrote:
> Rename invalid_engine to invalid-exec_queue subtest and changed return value
> as per kernel implementation.
> 
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  tests/intel/xe_waitfence.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/intel/xe_waitfence.c b/tests/intel/xe_waitfence.c
> index 7ba20764c..fd515a151 100644
> --- a/tests/intel/xe_waitfence.c
> +++ b/tests/intel/xe_waitfence.c
> @@ -151,8 +151,8 @@ waitfence(int fd, enum waittype wt)
>   * SUBTEST: invalid-ops
>   * Description: Check query with invalid ops returns expected error code
>   *
> - * SUBTEST: invalid-engine
> - * Description: Check query with invalid engine info returns expected error code
> + * SUBTEST: invalid-exec_queue
> + * Description: Check query with invalid exec_queue info returns expected error code
>   *
>   * SUBTEST: exec_queue-reset-wait
>   * Description: Don’t wait till timeout on user fence when exec_queue reset is detected and return return proper error
> @@ -207,7 +207,7 @@ invalid_ops(int fd)
>  }
>  
>  static void
> -invalid_engine(int fd)
> +invalid_exec_queue(int fd)
>  {
>  	uint32_t bo;
>  
> @@ -218,7 +218,7 @@ invalid_engine(int fd)
>  		.value = 1,
>  		.mask = DRM_XE_UFENCE_WAIT_MASK_U64,
>  		.timeout = -1,
> -		.exec_queue_id = 0,
> +		.exec_queue_id = -1,

The exec_queue_id shouldn't be here. It is totally ignored in the
exec_queue_create ioctl that is what is getting tested here.

>  	};
>  
>  	uint32_t vm = xe_vm_create(fd, 0, 0);
> @@ -227,7 +227,7 @@ invalid_engine(int fd)
>  
>  	do_bind(fd, vm, bo, 0, 0x200000, 0x40000, 1);
>  
> -	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EFAULT);
> +	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, ENOENT);

I'm afraid that this is wrong as well. ENOENT is not returned
in the exec_queue_create.

It is EFAULT that is returned when the wrong 'engine' (hw_engine) is
selected for this exec_queue.

Also, with this in mind, I believe this patch is entirely going to
the wrong direction. We are stop validating the invalid_engine and
trying to validate some other thing.

If you need to validate the exec_queue_id you likely need a new
test, instead of replacing this one like this.

>  }
>  
>  static void
> @@ -329,8 +329,8 @@ igt_main
>  	igt_subtest("invalid-ops")
>  		invalid_ops(fd);
>  
> -	igt_subtest("invalid-engine")
> -		invalid_engine(fd);
> +	igt_subtest("invalid-exec_queue")
> +		invalid_exec_queue(fd);
>  
>  	igt_subtest("exec_queue-reset-wait")
>  		exec_queue_reset_wait(fd);
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-01-11 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  6:25 [PATCH v3 0/3] tests/xe_waitfence: removed invalid_engine subtest Bommu Krishnaiah
2024-01-11  6:25 ` [PATCH v3 1/3] tests/xe_waitfence: Rename invalid_engine to invalid-exec_queue Bommu Krishnaiah
2024-01-11 14:45   ` Rodrigo Vivi [this message]
2024-01-11  6:25 ` [PATCH v3 2/3] tests/xe_waitfence: Removed drm_xe_sync data in exec_queue_reset_wait Bommu Krishnaiah
2024-01-11 14:51   ` Rodrigo Vivi
2024-01-11 14:51     ` Rodrigo Vivi
2024-01-11  6:25 ` [PATCH v3 3/3] tests/xe_waitfence: Removed duplicate code in waitfence Bommu Krishnaiah
2024-01-11 14:54   ` Rodrigo Vivi
2024-01-11  7:09 ` ✓ CI.xeBAT: success for tests/xe_waitfence: removed invalid_engine subtest (rev3) Patchwork
2024-01-11  7:10 ` ✓ Fi.CI.BAT: " Patchwork
2024-01-11  8:21 ` ✓ Fi.CI.IGT: " 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=ZZ__Ag5vzCIjxQWj@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=krishnaiah.bommu@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