public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1
@ 2019-01-10 15:36 Chris Wilson
  2019-01-10 16:01 ` Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2019-01-10 15:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Jani Nikula

Commit e27626898b87 ("igt: Check the physical swizzle status") stopped
trying to chase the parameters from the device sysfs, entirely by
accident. Make it a tiny bit more robust by forgiving the sysfs device
not being present and jumping to the /sys/module + driver name param
lookup fallback.

Reported-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
---
 lib/igt_sysfs.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index d323b81dd..cce342a05 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -189,7 +189,7 @@ bool igt_sysfs_set_parameter(int device,
 
 /**
  * igt_sysfs_open_parameters:
- * @device: fd of the device (or -1 to default to Intel)
+ * @device: fd of the device
  *
  * This opens the module parameters directory (under sysfs) corresponding
  * to the device for use with igt_sysfs_set() and igt_sysfs_get().
@@ -199,15 +199,15 @@ bool igt_sysfs_set_parameter(int device,
  */
 int igt_sysfs_open_parameters(int device)
 {
-	int dir, params;
+	int dir, params = -1;
 
 	dir = igt_sysfs_open(device, &params);
-	if (dir < 0)
-		return -1;
-
-	params = -1;
-	//params = openat(dir, "device/driver/module/parameters", O_RDONLY);
-	close(dir);
+	if (dir >= 0) {
+		params = openat(dir,
+				"device/driver/module/parameters",
+				O_RDONLY);
+		close(dir);
+	}
 
 	if (params < 0) { /* builtin? */
 		drm_version_t version;
-- 
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] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1
  2019-01-10 15:36 [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1 Chris Wilson
@ 2019-01-10 16:01 ` Jani Nikula
  2019-01-10 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-01-10 23:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2019-01-10 16:01 UTC (permalink / raw)
  To: Chris Wilson, igt-dev

On Thu, 10 Jan 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Commit e27626898b87 ("igt: Check the physical swizzle status") stopped
> trying to chase the parameters from the device sysfs, entirely by
> accident. Make it a tiny bit more robust by forgiving the sysfs device
> not being present and jumping to the /sys/module + driver name param
> lookup fallback.
>
> Reported-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>

Thanks,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> ---
>  lib/igt_sysfs.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index d323b81dd..cce342a05 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -189,7 +189,7 @@ bool igt_sysfs_set_parameter(int device,
>  
>  /**
>   * igt_sysfs_open_parameters:
> - * @device: fd of the device (or -1 to default to Intel)
> + * @device: fd of the device
>   *
>   * This opens the module parameters directory (under sysfs) corresponding
>   * to the device for use with igt_sysfs_set() and igt_sysfs_get().
> @@ -199,15 +199,15 @@ bool igt_sysfs_set_parameter(int device,
>   */
>  int igt_sysfs_open_parameters(int device)
>  {
> -	int dir, params;
> +	int dir, params = -1;
>  
>  	dir = igt_sysfs_open(device, &params);
> -	if (dir < 0)
> -		return -1;
> -
> -	params = -1;
> -	//params = openat(dir, "device/driver/module/parameters", O_RDONLY);
> -	close(dir);
> +	if (dir >= 0) {
> +		params = openat(dir,
> +				"device/driver/module/parameters",
> +				O_RDONLY);
> +		close(dir);
> +	}
>  
>  	if (params < 0) { /* builtin? */
>  		drm_version_t version;

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/sysfs: Repair override of params = -1
  2019-01-10 15:36 [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1 Chris Wilson
  2019-01-10 16:01 ` Jani Nikula
@ 2019-01-10 16:10 ` Patchwork
  2019-01-10 23:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-01-10 16:10 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib/sysfs: Repair override of params = -1
URL   : https://patchwork.freedesktop.org/series/55008/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5393 -> IGTPW_2215
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2215 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2215, 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/55008/revisions/1/mbox/

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

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

### IGT changes ###

#### Warnings ####

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       PASS -> FAIL [fdo#108767]

  * igt@kms_flip@basic-flip-vs-modeset:
    - fi-skl-6700hq:      PASS -> DMESG-WARN [fdo#105998] +1

  
#### Possible fixes ####

  * igt@i915_selftest@live_hangcheck:
    - fi-bwr-2160:        DMESG-FAIL [fdo#108735] -> PASS

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

  
  [fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108735]: https://bugs.freedesktop.org/show_bug.cgi?id=108735
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800


Participating hosts (49 -> 44)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-glk-j4005 fi-bdw-samus 


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

    * IGT: IGT_4758 -> IGTPW_2215

  CI_DRM_5393: 0b1d716508e72acc42bb10f4f3d3676585b292c7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2215: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2215/
  IGT_4758: f01796214bbde31e37b0593e547ad9436fdd02ba @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/sysfs: Repair override of params = -1
  2019-01-10 15:36 [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1 Chris Wilson
  2019-01-10 16:01 ` Jani Nikula
  2019-01-10 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-01-10 23:27 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-01-10 23:27 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib/sysfs: Repair override of params = -1
URL   : https://patchwork.freedesktop.org/series/55008/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5393_full -> IGTPW_2215_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2215_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2215_full, 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/55008/revisions/1/mbox/

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

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

### IGT changes ###

#### Warnings ####

  * igt@pm_rc6_residency@rc6-accuracy:
    - shard-snb:          PASS -> {SKIP}

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@pi-ringfull-bsd2:
    - shard-kbl:          NOTRUN -> FAIL [fdo#103158]

  * igt@gem_exec_suspend@basic-s3-devices:
    - shard-apl:          PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +5

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145] +2

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
    - shard-kbl:          PASS -> FAIL [fdo#107725] / [fdo#108145]

  * igt@kms_color@pipe-c-ctm-max:
    - shard-apl:          PASS -> FAIL [fdo#108147]

  * igt@kms_color@pipe-c-legacy-gamma:
    - shard-apl:          PASS -> FAIL [fdo#104782]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232] +1

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

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

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

  * igt@kms_flip@2x-flip-vs-expired-vblank:
    - shard-glk:          PASS -> FAIL [fdo#105363]

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

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
    - shard-glk:          PASS -> FAIL [fdo#103167] +6

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

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

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
    - shard-kbl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +3

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

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

  
#### Possible fixes ####

  * igt@gem_exec_reloc@basic-write-wc-active:
    - shard-snb:          INCOMPLETE [fdo#105411] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
    - shard-snb:          DMESG-WARN [fdo#107956] -> PASS +1

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

  * igt@kms_color@pipe-a-ctm-max:
    - shard-kbl:          FAIL [fdo#108147] -> PASS
    - shard-apl:          FAIL [fdo#108147] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-onscreen:
    - shard-kbl:          FAIL [fdo#103232] -> PASS +1

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

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-glk:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          FAIL [fdo#105363] -> PASS

  * igt@kms_flip@dpms-vs-vblank-race:
    - shard-glk:          FAIL [fdo#103060] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
    - shard-glk:          FAIL [fdo#103167] -> PASS

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

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

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

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-none:
    - shard-kbl:          FAIL [fdo#103166] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
    - shard-apl:          FAIL [fdo#103166] -> PASS +1

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

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@perf@rc6-disable:
    - shard-kbl:          FAIL [fdo#103179] -> PASS

  
#### Warnings ####

  * igt@i915_suspend@shrink:
    - shard-snb:          INCOMPLETE [fdo#105411] / [fdo#106886] -> DMESG-WARN [fdo#109244]

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

  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103179]: https://bugs.freedesktop.org/show_bug.cgi?id=103179
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
  [fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
  [fdo#109241]: https://bugs.freedesktop.org/show_bug.cgi?id=109241
  [fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (1): shard-skl 


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

    * IGT: IGT_4758 -> IGTPW_2215
    * Piglit: piglit_4509 -> None

  CI_DRM_5393: 0b1d716508e72acc42bb10f4f3d3676585b292c7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2215: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2215/
  IGT_4758: f01796214bbde31e37b0593e547ad9436fdd02ba @ 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_2215/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-01-10 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-10 15:36 [igt-dev] [PATCH i-g-t] lib/sysfs: Repair override of params = -1 Chris Wilson
2019-01-10 16:01 ` Jani Nikula
2019-01-10 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-10 23:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox