public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2] i915/gem_exec_params: Cross-check getparam against engine execution
Date: Fri, 3 Feb 2023 11:11:51 +0100	[thread overview]
Message-ID: <f5d65446-24b3-e56e-7043-a4be27563542@linux.intel.com> (raw)
In-Reply-To: <20230203092406.2q2j22z3stpcplp5@kamilkon-desk1>


On 2/3/2023 10:24 AM, Kamil Konieczny wrote:
> Hi Nirmoy,
>
> LGTM,
>
> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>


Thanks, Kamil!

>
> --
> Kamil
>
> On 2023-02-02 at 18:27:44 +0100, Nirmoy Das wrote:
>> From: Chris Wilson <chris.p.wilson@intel.com>
>>
>> Do not just skip the test if getparam for bsd, blt, vebox passes.
>> Be more robust and compare result of getparam with a engine execution
>> which should give more test coverage.
>>
>> v2: improve commit message and keep RUN_FAIL()(Kamil)
>>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
>> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
>> Co-developed-by: Nirmoy Das <nirmoy.das@intel.com>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   tests/i915/gem_exec_params.c | 17 ++++++++---------
>>   1 file changed, 8 insertions(+), 9 deletions(-)
>>
>> diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
>> index 618635ec3..fd86afa16 100644
>> --- a/tests/i915/gem_exec_params.c
>> +++ b/tests/i915/gem_exec_params.c
>> @@ -411,24 +411,23 @@ igt_main
>>   	igt_subtest("mmapped")
>>   		mmapped(fd);
>>   
>> -#define RUN_FAIL(expected_errno) do { \
>> -		igt_assert_eq(__gem_execbuf(fd, &execbuf), -expected_errno); \
>> -	} while(0)
>> +#define CHK_RUN(has_check, expected_errno) \
>> +		igt_assert_eq(__gem_execbuf(fd, &execbuf), has_check(fd) ? 0 : -(expected_errno))
>> +#define RUN_FAIL(expected_errno) \
>> +		igt_assert_eq(__gem_execbuf(fd, &execbuf), -(expected_errno))
>> +
>>   
>>   	igt_subtest("no-bsd") {
>> -		igt_require(!gem_has_bsd(fd));
>>   		execbuf.flags = I915_EXEC_BSD;
>> -		RUN_FAIL(EINVAL);
>> +		CHK_RUN(gem_has_bsd, EINVAL);
>>   	}
>>   	igt_subtest("no-blt") {
>> -		igt_require(!gem_has_blt(fd));
>>   		execbuf.flags = I915_EXEC_BLT;
>> -		RUN_FAIL(EINVAL);
>> +		CHK_RUN(gem_has_blt, EINVAL);
>>   	}
>>   	igt_subtest("no-vebox") {
>> -		igt_require(!gem_has_vebox(fd));
>>   		execbuf.flags = I915_EXEC_VEBOX;
>> -		RUN_FAIL(EINVAL);
>> +		CHK_RUN(gem_has_vebox, EINVAL);
>>   	}
>>   	igt_subtest("invalid-ring") {
>>   		execbuf.flags = I915_EXEC_RING_MASK;
>> -- 
>> 2.39.0
>>

      reply	other threads:[~2023-02-03 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 17:27 [igt-dev] [PATCH i-g-t v2] i915/gem_exec_params: Cross-check getparam against engine execution Nirmoy Das
2023-02-02 18:22 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_params: Cross-check getparam against engine execution (rev3) Patchwork
2023-02-02 22:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-03  9:24 ` [igt-dev] [PATCH i-g-t v2] i915/gem_exec_params: Cross-check getparam against engine execution Kamil Konieczny
2023-02-03 10:11   ` Das, Nirmoy [this message]

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=f5d65446-24b3-e56e-7043-a4be27563542@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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