From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
Date: Mon, 10 Feb 2020 12:41:25 -0800 [thread overview]
Message-ID: <d0f50a44-de04-6a6a-1618-8503b9332e48@intel.com> (raw)
In-Reply-To: <158136652484.5235.15265352592478927262@skylake-alporthouse-com>
On 10/02/20 12:28, Chris Wilson wrote:
> Quoting Antonio Argenziano (2020-02-10 19:39:08)
>> The test needs to have at least some engines to run, if no engines are
>> present flag it as a skip rather than have a pass. This patch also fixes
>> the error check for perf_i915_open().
>>
>> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
>>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> ---
>> tests/i915/gem_exec_balancer.c | 20 +++++++++++++++++++-
>> 1 file changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
>> index 150eba0d..df816feb 100644
>> --- a/tests/i915/gem_exec_balancer.c
>> +++ b/tests/i915/gem_exec_balancer.c
>> @@ -61,7 +61,7 @@ static bool has_class_instance(int i915, uint16_t class, uint16_t instance)
>> int fd;
>>
>> fd = perf_i915_open(i915, I915_PMU_ENGINE_BUSY(class, instance));
>> - if (fd != -1) {
>> + if (fd >= 0) {
>> close(fd);
>> return true;
>> }
>> @@ -113,6 +113,23 @@ list_engines(int i915, uint32_t class_mask, unsigned int *out)
>> return engines;
>> }
>>
>> +static bool has_engines(int i915)
>> +{
>
> igt_require(igt_i915_perf_type(i915)); /* or whatever it was called */ ?
Keep it in the fixture?
Antonio
> -Chris
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-10 20:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 19:39 [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available Antonio Argenziano
2020-02-10 20:28 ` Chris Wilson
2020-02-10 20:41 ` Antonio Argenziano [this message]
2020-02-10 20:43 ` Chris Wilson
2020-02-10 20:45 ` Antonio Argenziano
2020-02-10 20:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " 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=d0f50a44-de04-6a6a-1618-8503b9332e48@intel.com \
--to=antonio.argenziano@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/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