All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters
@ 2019-12-10 14:25 Janusz Krzysztofik
  2019-12-10 14:30   ` [igt-dev] " Chris Wilson
  2019-12-10 15:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Janusz Krzysztofik @ 2019-12-10 14:25 UTC (permalink / raw)
  To: igt-dev, intel-gfx; +Cc: Michał Czapliński, Jari Tahvanainen

Boolean module parameters are exposed as "Y"/"N" strings, not 0/1.
Make igt_sysfs_get_boolean() helper useful for getting their values.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_sysfs.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index c439944d..c2b8291d 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -474,11 +474,23 @@ bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value)
  */
 bool igt_sysfs_get_boolean(int dir, const char *attr)
 {
+	char *buf;
 	int result;
 
-	if (igt_sysfs_scanf(dir, attr, "%d", &result) != 1)
+	buf = igt_sysfs_get(dir, attr);
+	if (!buf)
 		return false;
 
+	if (sscanf(buf, "%d", &result) == 1)
+		goto out;
+
+	/* kernel's param_get_bool() returns "Y"/"N" */
+	if (!strcmp(buf, "Y"))
+		result = true;
+	else
+		result = false;
+out:
+	free(buf);
 	return result;
 }
 
-- 
2.21.0

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

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

* Re: [Intel-gfx] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters
  2019-12-10 14:25 [Intel-gfx] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters Janusz Krzysztofik
@ 2019-12-10 14:30   ` Chris Wilson
  2019-12-10 15:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-12-10 14:30 UTC (permalink / raw)
  To: Janusz Krzysztofik, igt-dev, intel-gfx
  Cc: Michał Czapliński, Jari Tahvanainen

Quoting Janusz Krzysztofik (2019-12-10 14:25:31)
> Boolean module parameters are exposed as "Y"/"N" strings, not 0/1.
> Make igt_sysfs_get_boolean() helper useful for getting their values.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  lib/igt_sysfs.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index c439944d..c2b8291d 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -474,11 +474,23 @@ bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value)
>   */
>  bool igt_sysfs_get_boolean(int dir, const char *attr)
>  {
> +       char *buf;
>         int result;
>  
> -       if (igt_sysfs_scanf(dir, attr, "%d", &result) != 1)
> +       buf = igt_sysfs_get(dir, attr);
> +       if (!buf)
>                 return false;
>  
> +       if (sscanf(buf, "%d", &result) == 1)
> +               goto out;
> +
> +       /* kernel's param_get_bool() returns "Y"/"N" */
> +       if (!strcmp(buf, "Y"))
> +               result = true;
> +       else
> +               result = false;

result = !strcasecmp(buf, "Y");

Just for compactness?

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters
@ 2019-12-10 14:30   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-12-10 14:30 UTC (permalink / raw)
  To: Janusz Krzysztofik, igt-dev, intel-gfx
  Cc: Michał Czapliński, Jari Tahvanainen, Karol Krol

Quoting Janusz Krzysztofik (2019-12-10 14:25:31)
> Boolean module parameters are exposed as "Y"/"N" strings, not 0/1.
> Make igt_sysfs_get_boolean() helper useful for getting their values.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  lib/igt_sysfs.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index c439944d..c2b8291d 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -474,11 +474,23 @@ bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value)
>   */
>  bool igt_sysfs_get_boolean(int dir, const char *attr)
>  {
> +       char *buf;
>         int result;
>  
> -       if (igt_sysfs_scanf(dir, attr, "%d", &result) != 1)
> +       buf = igt_sysfs_get(dir, attr);
> +       if (!buf)
>                 return false;
>  
> +       if (sscanf(buf, "%d", &result) == 1)
> +               goto out;
> +
> +       /* kernel's param_get_bool() returns "Y"/"N" */
> +       if (!strcmp(buf, "Y"))
> +               result = true;
> +       else
> +               result = false;

result = !strcasecmp(buf, "Y");

Just for compactness?

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
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: failure for lib/sysfs: Add support for getting boolean module parameters
  2019-12-10 14:25 [Intel-gfx] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters Janusz Krzysztofik
  2019-12-10 14:30   ` [igt-dev] " Chris Wilson
@ 2019-12-10 15:42 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-12-10 15:42 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: igt-dev

== Series Details ==

Series: lib/sysfs: Add support for getting boolean module parameters
URL   : https://patchwork.freedesktop.org/series/70691/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7528 -> IGTPW_3840
====================================================

Summary
-------

  **FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_wait@basic-wait-all:
    - fi-ivb-3770:        [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-ivb-3770/igt@gem_wait@basic-wait-all.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-ivb-3770/igt@gem_wait@basic-wait-all.html

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@gem_exec_parallel@basic:
    - {fi-tgl-guc}:       [INCOMPLETE][3] ([i915#476]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-tgl-guc/igt@gem_exec_parallel@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-tgl-guc/igt@gem_exec_parallel@basic.html

  * igt@gem_sync@basic-each:
    - {fi-tgl-u}:         [INCOMPLETE][5] ([i915#472] / [i915#707]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-tgl-u/igt@gem_sync@basic-each.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-tgl-u/igt@gem_sync@basic-each.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-hsw-peppy:       [DMESG-FAIL][7] ([i915#722]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html

  
#### Warnings ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770:        [DMESG-FAIL][9] ([i915#553] / [i915#725]) -> [DMESG-FAIL][10] ([i915#770])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-hsw-4770/igt@i915_selftest@live_blt.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-hsw-4770/igt@i915_selftest@live_blt.html

  * igt@kms_busy@basic-flip-pipe-b:
    - fi-kbl-x1275:       [DMESG-WARN][11] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][12] ([i915#62] / [i915#92]) +7 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-b.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-kbl-x1275/igt@kms_busy@basic-flip-pipe-b.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][13] ([fdo#111096] / [i915#323]) -> [FAIL][14] ([fdo#111407])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][15] ([i915#62] / [i915#92]) -> [DMESG-WARN][16] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7528/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

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

  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
  [i915#472]: https://gitlab.freedesktop.org/drm/intel/issues/472
  [i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
  [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
  [i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
  [i915#770]: https://gitlab.freedesktop.org/drm/intel/issues/770
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (56 -> 47)
------------------------------

  Missing    (9): fi-icl-1065g7 fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5341 -> IGTPW_3840

  CI-20190529: 20190529
  CI_DRM_7528: 1f2c18c105263727ef41dfc7fd8c72012aafaefb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3840: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/index.html
  IGT_5341: 5fe683cdebde2d77d16ffc42c9fdf29a9f95bb82 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3840/index.html
_______________________________________________
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-12-10 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 14:25 [Intel-gfx] [RFC PATCH i-g-t] lib/sysfs: Add support for getting boolean module parameters Janusz Krzysztofik
2019-12-10 14:30 ` Chris Wilson
2019-12-10 14:30   ` [igt-dev] " Chris Wilson
2019-12-10 15:42 ` [igt-dev] ✗ Fi.CI.BAT: failure 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.