All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/hangman: Read a dummy byte to check sysfs existence
@ 2019-01-11 10:35 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-01-11 10:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

sysfs doesn't give the driver an open() callback, so we can only report
the unavailability of HW on the first read; so check read() after checking
open().

Fixes: 93f0ad4b835e ("i915/hangman: Skip if disabled by the kernel")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/hangman.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/i915/hangman.c b/tests/i915/hangman.c
index ffbd0b057..5f63bfc4b 100644
--- a/tests/i915/hangman.c
+++ b/tests/i915/hangman.c
@@ -45,14 +45,20 @@ static int sysfs = -1;
 
 static bool has_error_state(int dir)
 {
+	bool result;
 	int fd;
 
 	fd = openat(dir, "error", O_RDONLY);
 	if (fd < 0)
 		return false;
 
+	if (read(fd, &result, sizeof(result)) < 0)
+		result = false;
+	else
+		result = true;
+
 	close(fd);
-	return true;
+	return result;
 }
 
 static void assert_entry(const char *s, bool expect)
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [igt-dev] [PATCH i-g-t] i915/hangman: Read a dummy byte to check sysfs existence
@ 2019-01-11 10:35 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-01-11 10:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

sysfs doesn't give the driver an open() callback, so we can only report
the unavailability of HW on the first read; so check read() after checking
open().

Fixes: 93f0ad4b835e ("i915/hangman: Skip if disabled by the kernel")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/hangman.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/i915/hangman.c b/tests/i915/hangman.c
index ffbd0b057..5f63bfc4b 100644
--- a/tests/i915/hangman.c
+++ b/tests/i915/hangman.c
@@ -45,14 +45,20 @@ static int sysfs = -1;
 
 static bool has_error_state(int dir)
 {
+	bool result;
 	int fd;
 
 	fd = openat(dir, "error", O_RDONLY);
 	if (fd < 0)
 		return false;
 
+	if (read(fd, &result, sizeof(result)) < 0)
+		result = false;
+	else
+		result = true;
+
 	close(fd);
-	return true;
+	return result;
 }
 
 static void assert_entry(const char *s, bool expect)
-- 
2.20.1

_______________________________________________
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

* [igt-dev] ✓ Fi.CI.BAT: success for i915/hangman: Read a dummy byte to check sysfs existence
  2019-01-11 10:35 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-01-11 11:08 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-01-11 11:08 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/hangman: Read a dummy byte to check sysfs existence
URL   : https://patchwork.freedesktop.org/series/55049/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5402 -> IGTPW_2220
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2220 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2220, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55049/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2220:

### IGT changes ###

#### Warnings ####

  * igt@pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       PASS -> {SKIP}

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u3:          PASS -> FAIL [fdo#103167]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@pm_rpm@basic-rte:
    - fi-bsw-kefka:       PASS -> FAIL [fdo#108800]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800


Participating hosts (42 -> 43)
------------------------------

  Additional (6): fi-hsw-peppy fi-apl-guc fi-snb-2520m fi-glk-j4005 fi-gdg-551 fi-pnv-d510 
  Missing    (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq 


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

    * IGT: IGT_4759 -> IGTPW_2220

  CI_DRM_5402: bfde6b780f9b2a5ee0dc3535917c42d1e5234a3f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2220: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2220/
  IGT_4759: 478452fece3997dfacaa4d6babe6b8bf6fef784f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2220/
_______________________________________________
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] i915/hangman: Read a dummy byte to check sysfs existence
  2019-01-11 10:35 ` [igt-dev] " Chris Wilson
@ 2019-01-11 11:37   ` Tvrtko Ursulin
  -1 siblings, 0 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 11:37 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 11/01/2019 10:35, Chris Wilson wrote:
> sysfs doesn't give the driver an open() callback, so we can only report
> the unavailability of HW on the first read; so check read() after checking
> open().
> 
> Fixes: 93f0ad4b835e ("i915/hangman: Skip if disabled by the kernel")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/hangman.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/i915/hangman.c b/tests/i915/hangman.c
> index ffbd0b057..5f63bfc4b 100644
> --- a/tests/i915/hangman.c
> +++ b/tests/i915/hangman.c
> @@ -45,14 +45,20 @@ static int sysfs = -1;
>   
>   static bool has_error_state(int dir)
>   {
> +	bool result;
>   	int fd;
>   
>   	fd = openat(dir, "error", O_RDONLY);
>   	if (fd < 0)
>   		return false;
>   
> +	if (read(fd, &result, sizeof(result)) < 0)
> +		result = false;
> +	else
> +		result = true;
> +
>   	close(fd);
> -	return true;
> +	return result;
>   }
>   
>   static void assert_entry(const char *s, bool expect)
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] i915/hangman: Read a dummy byte to check sysfs existence
@ 2019-01-11 11:37   ` Tvrtko Ursulin
  0 siblings, 0 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 11:37 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 11/01/2019 10:35, Chris Wilson wrote:
> sysfs doesn't give the driver an open() callback, so we can only report
> the unavailability of HW on the first read; so check read() after checking
> open().
> 
> Fixes: 93f0ad4b835e ("i915/hangman: Skip if disabled by the kernel")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/hangman.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/i915/hangman.c b/tests/i915/hangman.c
> index ffbd0b057..5f63bfc4b 100644
> --- a/tests/i915/hangman.c
> +++ b/tests/i915/hangman.c
> @@ -45,14 +45,20 @@ static int sysfs = -1;
>   
>   static bool has_error_state(int dir)
>   {
> +	bool result;
>   	int fd;
>   
>   	fd = openat(dir, "error", O_RDONLY);
>   	if (fd < 0)
>   		return false;
>   
> +	if (read(fd, &result, sizeof(result)) < 0)
> +		result = false;
> +	else
> +		result = true;
> +
>   	close(fd);
> -	return true;
> +	return result;
>   }
>   
>   static void assert_entry(const char *s, bool expect)
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
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.IGT: success for i915/hangman: Read a dummy byte to check sysfs existence
  2019-01-11 10:35 ` [igt-dev] " Chris Wilson
                   ` (2 preceding siblings ...)
  (?)
@ 2019-01-11 16:31 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-01-11 16:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/hangman: Read a dummy byte to check sysfs existence
URL   : https://patchwork.freedesktop.org/series/55049/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5402_full -> IGTPW_2220_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55049/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145] +1

  * igt@kms_cursor_crc@cursor-128x42-sliding:
    - shard-apl:          PASS -> FAIL [fdo#103232] +3

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-glk:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-apl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167] +3

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-apl:          PASS -> FAIL [fdo#108948]

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          PASS -> FAIL [fdo#103166] +5
    - shard-kbl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
    - shard-glk:          PASS -> FAIL [fdo#103166] +5

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-glk:          PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]

  
#### Possible fixes ####

  * igt@gem_flink_basic@bad-flink:
    - shard-snb:          INCOMPLETE [fdo#105411] -> PASS

  * igt@kms_busy@extended-pageflip-hang-newfb-render-b:
    - shard-glk:          DMESG-WARN [fdo#107956] -> PASS

  * igt@kms_color@pipe-b-degamma:
    - shard-kbl:          FAIL [fdo#104782] -> PASS
    - shard-apl:          FAIL [fdo#104782] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-kbl:          FAIL [fdo#103232] -> PASS
    - shard-glk:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_cursor_crc@cursor-64x64-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy:
    - shard-hsw:          FAIL [fdo#105767] -> PASS

  * igt@kms_flip@2x-flip-vs-modeset-vs-hang-interruptible:
    - shard-glk:          INCOMPLETE [fdo#103359] / [k.org#198133] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
    - shard-apl:          FAIL [fdo#103167] -> PASS +1
    - shard-kbl:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS +1

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-apl:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS
    - shard-kbl:          FAIL [fdo#103166] -> PASS

  * igt@kms_setmode@basic:
    - shard-apl:          FAIL [fdo#99912] -> PASS

  * igt@pm_rps@waitboost:
    - shard-apl:          FAIL [fdo#102250] -> PASS

  
#### Warnings ####

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          DMESG-WARN [fdo#105604] -> DMESG-FAIL [fdo#108950]

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (6 -> 5)
------------------------------

  Missing    (1): shard-skl 


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

    * IGT: IGT_4759 -> IGTPW_2220
    * Piglit: piglit_4509 -> None

  CI_DRM_5402: bfde6b780f9b2a5ee0dc3535917c42d1e5234a3f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2220: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2220/
  IGT_4759: 478452fece3997dfacaa4d6babe6b8bf6fef784f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2220/
_______________________________________________
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:[~2019-01-11 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 10:35 [PATCH i-g-t] i915/hangman: Read a dummy byte to check sysfs existence Chris Wilson
2019-01-11 10:35 ` [igt-dev] " Chris Wilson
2019-01-11 11:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-11 11:37 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
2019-01-11 11:37   ` Tvrtko Ursulin
2019-01-11 16:31 ` [igt-dev] ✓ Fi.CI.IGT: 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.