All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
@ 2020-02-10 19:39 Antonio Argenziano
  2020-02-10 20:28 ` Chris Wilson
  2020-02-10 20:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 6+ messages in thread
From: Antonio Argenziano @ 2020-02-10 19:39 UTC (permalink / raw)
  To: igt-dev

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)
+{
+	for (int class = 0; class < 32; class++) {
+		struct i915_engine_class_instance *ci;
+		unsigned int count;
+
+		ci = list_engines(i915, 1 << class, &count);
+		if (!ci)
+			continue;
+
+		if (count > 0)
+			return true;
+	}
+
+	return false;
+}
+
 static int __set_engines(int i915, uint32_t ctx,
 			 const struct i915_engine_class_instance *ci,
 			 unsigned int count)
@@ -1818,6 +1835,7 @@ igt_main
 		gem_require_contexts(i915);
 		igt_require(has_context_engines(i915));
 		igt_require(has_load_balancer(i915));
+		igt_require(has_engines(i915));
 
 		igt_fork_hang_detector(i915);
 	}
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
  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
  2020-02-10 20:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2020-02-10 20:28 UTC (permalink / raw)
  To: Antonio Argenziano, igt-dev

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 */ ?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_exec_balancer: Skip the test if no engines are available
  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:31 ` Patchwork
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-02-10 20:31 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: igt-dev

== Series Details ==

Series: tests/i915/gem_exec_balancer: Skip the test if no engines are available
URL   : https://patchwork.freedesktop.org/series/73254/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7903 -> IGTPW_4121
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/index.html

Known issues
------------

  Here are the changes found in IGTPW_4121 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-skl-6770hq:      [PASS][1] -> [DMESG-WARN][2] ([i915#92]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-skl-6770hq/igt@i915_module_load@reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-skl-6770hq/igt@i915_module_load@reload.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [PASS][3] -> [FAIL][4] ([fdo#109635] / [i915#217])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][5] -> [FAIL][6] ([fdo#111096] / [i915#323])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
    - fi-skl-6770hq:      [PASS][7] -> [SKIP][8] ([fdo#109271]) +5 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-skl-6770hq/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-skl-6770hq/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-skl-6770hq:      [PASS][9] -> [DMESG-WARN][10] ([i915#106] / [i915#188])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-skl-6770hq/igt@kms_pipe_crc_basic@read-crc-pipe-b.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-skl-6770hq/igt@kms_pipe_crc_basic@read-crc-pipe-b.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_blt:
    - fi-bsw-n3050:       [INCOMPLETE][11] ([i915#392]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-bsw-n3050/igt@i915_selftest@live_blt.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-bsw-n3050/igt@i915_selftest@live_blt.html
    - fi-ivb-3770:        [DMESG-FAIL][13] ([i915#725]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-ivb-3770/igt@i915_selftest@live_blt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-ivb-3770/igt@i915_selftest@live_blt.html
    - fi-hsw-4770:        [DMESG-FAIL][15] ([i915#553] / [i915#725]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-hsw-4770/igt@i915_selftest@live_blt.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-hsw-4770/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-8700k:       [DMESG-FAIL][17] ([i915#623]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
    - fi-byt-n2820:       [DMESG-FAIL][19] ([i915#1052]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
    - fi-cml-s:           [DMESG-FAIL][21] ([i915#877]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/fi-cml-s/igt@i915_selftest@live_gem_contexts.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052
  [i915#106]: https://gitlab.freedesktop.org/drm/intel/issues/106
  [i915#188]: https://gitlab.freedesktop.org/drm/intel/issues/188
  [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
  [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
  [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
  [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
  [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
  [i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92


Participating hosts (47 -> 43)
------------------------------

  Additional (5): fi-hsw-peppy fi-gdg-551 fi-skl-lmem fi-kbl-7560u fi-snb-2600 
  Missing    (9): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-glk-dsi fi-byt-squawks fi-bwr-2160 fi-pnv-d510 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5433 -> IGTPW_4121

  CI-20190529: 20190529
  CI_DRM_7903: 47b768c475f4a11a48bc43e6228660f8b26a542b @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4121: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/index.html
  IGT_5433: 6a96c17f3a1b4e1f90b1a0b0ce42a7219875d1a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4121/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
  2020-02-10 20:28 ` Chris Wilson
@ 2020-02-10 20:41   ` Antonio Argenziano
  2020-02-10 20:43     ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Argenziano @ 2020-02-10 20:41 UTC (permalink / raw)
  To: Chris Wilson, igt-dev



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
  2020-02-10 20:41   ` Antonio Argenziano
@ 2020-02-10 20:43     ` Chris Wilson
  2020-02-10 20:45       ` Antonio Argenziano
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2020-02-10 20:43 UTC (permalink / raw)
  To: Antonio Argenziano, igt-dev

Quoting Antonio Argenziano (2020-02-10 20:41:25)
> 
> 
> 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?

Preference would be something like

static bool has_perf_engines(int i915)
{
	return igt_i915_perf_type(i915));
}

igt_fixture:
	igt_require(has_perf_engines(i915));
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_exec_balancer: Skip the test if no engines are available
  2020-02-10 20:43     ` Chris Wilson
@ 2020-02-10 20:45       ` Antonio Argenziano
  0 siblings, 0 replies; 6+ messages in thread
From: Antonio Argenziano @ 2020-02-10 20:45 UTC (permalink / raw)
  To: Chris Wilson, igt-dev



On 10/02/20 12:43, Chris Wilson wrote:
> Quoting Antonio Argenziano (2020-02-10 20:41:25)
>>
>>
>> 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?
> 
> Preference would be something like
> 
> static bool has_perf_engines(int i915)
> {
> 	return igt_i915_perf_type(i915));
> }
> 
> igt_fixture:
> 	igt_require(has_perf_engines(i915));

Agreed, it makes the require more readable.

Antonio

> -Chris
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-10 20:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.