All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection
@ 2018-07-09 18:11 Michał Winiarski
  2018-07-09 18:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michał Winiarski @ 2018-07-09 18:11 UTC (permalink / raw)
  To: igt-dev

From: Chris Wilson <chris@chris-wilson.co.uk>

The current method of checking for a failed module load is flawed, as we
only report the error on probing it is not being reported back by
modprobe. So we have to dig inside the module_parameters while the
module is still loaded to discover the error.

v2: Expect i915.inject_load_failure to be zero on success

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
---
 tests/drv_module_reload.c | 45 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 40 insertions(+), 5 deletions(-)

diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
index 3046d822..5d6680b0 100644
--- a/tests/drv_module_reload.c
+++ b/tests/drv_module_reload.c
@@ -234,6 +234,38 @@ reload(const char *opts_i915)
 	return err;
 }
 
+static int open_parameters(const char *module_name)
+{
+	char path[256];
+
+	snprintf(path, sizeof(path), "/sys/module/%s/parameters", module_name);
+	return open(path, O_RDONLY);
+}
+
+static int
+inject_fault(const char *module_name, const char *opt, int fault)
+{
+	char buf[1024];
+	int dir;
+
+	igt_assert(fault > 0);
+	snprintf(buf, sizeof(buf), "%s=%d", opt, fault);
+
+	if (igt_kmod_load(module_name, buf)) {
+		igt_warn("Failed to load module '%s' with options '%s'\n",
+			 module_name, buf);
+		return 1;
+	}
+
+	dir = open_parameters(module_name);
+	igt_sysfs_scanf(dir, opt, "%d", &fault);
+	close(dir);
+
+	igt_kmod_unload(module_name, 0);
+
+	return fault;
+}
+
 static void
 gem_sanitycheck(void)
 {
@@ -320,12 +352,15 @@ igt_main
 		igt_assert_eq(reload("disable_display=1"), 0);
 
 	igt_subtest("basic-reload-inject") {
-		char buf[64];
 		int i = 0;
-		do {
-			snprintf(buf, sizeof(buf),
-				 "inject_load_failure=%d", ++i);
-		} while (reload(buf));
+
+		igt_i915_driver_unload();
+
+		while (inject_fault("i915", "inject_load_failure", ++i) == 0)
+			;
+
+		/* We expect to hit at least one fault! */
+		igt_assert(i > 1);
 	}
 
 	igt_fixture {
-- 
2.17.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

* [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6)
  2018-07-09 18:11 [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Michał Winiarski
@ 2018-07-09 18:46 ` Patchwork
  2018-07-09 19:56 ` [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Chris Wilson
  2018-07-11  8:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-07-09 18:46 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/drv_module_reload: Revamp fault-injection (rev6)
URL   : https://patchwork.freedesktop.org/series/44363/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4453 -> IGTPW_1548 =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1548 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1548, 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/44363/revisions/6/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-reload-inject:
      fi-skl-6260u:       PASS -> INCOMPLETE
      fi-snb-2600:        PASS -> INCOMPLETE
      fi-kbl-7560u:       PASS -> INCOMPLETE
      fi-kbl-guc:         PASS -> DMESG-FAIL
      fi-skl-6770hq:      PASS -> INCOMPLETE
      fi-bwr-2160:        PASS -> INCOMPLETE
      fi-kbl-r:           PASS -> INCOMPLETE
      fi-cfl-s3:          PASS -> INCOMPLETE
      {fi-cfl-8109u}:     PASS -> INCOMPLETE
      fi-gdg-551:         PASS -> INCOMPLETE
      fi-ilk-650:         PASS -> INCOMPLETE
      fi-bsw-n3050:       PASS -> INCOMPLETE
      fi-kbl-7567u:       PASS -> INCOMPLETE
      fi-ivb-3770:        PASS -> INCOMPLETE
      fi-whl-u:           PASS -> INCOMPLETE
      fi-skl-6700hq:      PASS -> INCOMPLETE
      fi-kbl-7500u:       PASS -> INCOMPLETE
      fi-ivb-3520m:       PASS -> INCOMPLETE
      fi-hsw-4770:        PASS -> INCOMPLETE
      fi-glk-dsi:         PASS -> INCOMPLETE
      fi-bdw-5557u:       PASS -> INCOMPLETE
      fi-cfl-8700k:       PASS -> INCOMPLETE
      fi-hsw-peppy:       NOTRUN -> INCOMPLETE
      fi-pnv-d510:        PASS -> INCOMPLETE
      fi-hsw-4770r:       PASS -> INCOMPLETE
      fi-blb-e6850:       PASS -> INCOMPLETE
      fi-skl-6700k2:      PASS -> INCOMPLETE

    
    ==== Warnings ====

    igt@drv_module_reload@basic-reload-inject:
      {fi-skl-iommu}:     FAIL (fdo#106066) -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload-inject:
      fi-byt-j1900:       PASS -> INCOMPLETE (fdo#102657)
      fi-byt-n2820:       PASS -> INCOMPLETE (fdo#102657)
      fi-bxt-j4205:       PASS -> INCOMPLETE (fdo#103927)
      fi-snb-2520m:       NOTRUN -> INCOMPLETE (fdo#103713)
      fi-bdw-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-glk-j4005:       PASS -> INCOMPLETE (fdo#103359, k.org#198133)
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)
      fi-skl-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-skl-6600u:       PASS -> INCOMPLETE (fdo#104108)
      fi-cfl-guc:         PASS -> INCOMPLETE (fdo#106693)
      fi-elk-e7500:       PASS -> INCOMPLETE (fdo#103989)

    igt@gem_exec_suspend@basic-s4-devices:
      {fi-kbl-8809g}:     NOTRUN -> INCOMPLETE (fdo#107139)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-skl-6700hq:      PASS -> DMESG-WARN (fdo#105998)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-bxt-j4205:       FAIL (fdo#103167) -> PASS
      fi-skl-6700hq:      FAIL (fdo#103167) -> PASS
      fi-bxt-dsi:         FAIL (fdo#103167) -> PASS
      fi-skl-6700k2:      FAIL (fdo#103167) -> PASS
      fi-kbl-7560u:       FAIL (fdo#103167) -> PASS
      fi-skl-6600u:       FAIL (fdo#103167) -> PASS
      fi-kbl-r:           FAIL (fdo#103167) -> PASS
      {fi-cfl-8109u}:     FAIL (fdo#103167) -> PASS
      fi-skl-6260u:       FAIL (fdo#103167) -> PASS
      fi-skl-6770hq:      FAIL (fdo#103167) -> PASS
      fi-cfl-guc:         FAIL (fdo#103167) -> PASS
      fi-cfl-s3:          FAIL (fdo#103167) -> PASS
      fi-whl-u:           FAIL (fdo#103167) -> PASS
      fi-cfl-8700k:       FAIL (fdo#103167) -> PASS
      fi-kbl-7500u:       FAIL (fdo#103167) -> PASS
      fi-kbl-7567u:       FAIL (fdo#103167) -> PASS
      fi-glk-j4005:       FAIL (fdo#103167) -> PASS
      fi-glk-dsi:         FAIL (fdo#103167) -> PASS
      fi-skl-gvtdvm:      FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

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

  fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106066 https://bugs.freedesktop.org/show_bug.cgi?id=106066
  fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (44 -> 41) ==

  Additional (2): fi-hsw-peppy fi-kbl-8809g 
  Missing    (5): fi-skl-guc fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4543 -> IGTPW_1548

  CI_DRM_4453: 940e07c2a136b53965e4a6728e01e1638f5ba2de @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1548: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1548/
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1548/issues.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

* Re: [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection
  2018-07-09 18:11 [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Michał Winiarski
  2018-07-09 18:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
@ 2018-07-09 19:56 ` Chris Wilson
  2018-07-11  8:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2018-07-09 19:56 UTC (permalink / raw)
  To: Michał Winiarski, igt-dev

Quoting Michał Winiarski (2018-07-09 19:11:41)
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> The current method of checking for a failed module load is flawed, as we
> only report the error on probing it is not being reported back by
> modprobe. So we have to dig inside the module_parameters while the
> module is still loaded to discover the error.
> 
> v2: Expect i915.inject_load_failure to be zero on success
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

We have to pass "disable_display=1" as well to bypass this nasty
failure. :|
-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 igt/drv_module_reload: Revamp fault-injection (rev6)
  2018-07-09 18:11 [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Michał Winiarski
  2018-07-09 18:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
  2018-07-09 19:56 ` [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Chris Wilson
@ 2018-07-11  8:38 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-07-11  8:38 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/drv_module_reload: Revamp fault-injection (rev6)
URL   : https://patchwork.freedesktop.org/series/44363/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4466 -> IGTPW_1555 =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1555 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1555, 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/44363/revisions/6/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-reload-inject:
      fi-skl-6260u:       PASS -> INCOMPLETE
      fi-snb-2600:        PASS -> INCOMPLETE
      fi-kbl-7560u:       PASS -> INCOMPLETE
      fi-kbl-guc:         NOTRUN -> DMESG-FAIL
      fi-skl-6770hq:      PASS -> INCOMPLETE
      fi-bwr-2160:        PASS -> INCOMPLETE
      fi-kbl-r:           PASS -> INCOMPLETE
      fi-cfl-s3:          PASS -> INCOMPLETE
      {fi-cfl-8109u}:     PASS -> INCOMPLETE
      fi-gdg-551:         PASS -> INCOMPLETE
      fi-ilk-650:         PASS -> INCOMPLETE
      fi-bsw-n3050:       PASS -> INCOMPLETE
      fi-kbl-7567u:       PASS -> INCOMPLETE
      fi-ivb-3770:        PASS -> INCOMPLETE
      fi-whl-u:           PASS -> INCOMPLETE
      fi-skl-6700hq:      PASS -> INCOMPLETE
      fi-kbl-7500u:       PASS -> INCOMPLETE
      fi-ivb-3520m:       PASS -> INCOMPLETE
      fi-hsw-4770:        PASS -> INCOMPLETE
      fi-glk-dsi:         PASS -> INCOMPLETE
      fi-bdw-5557u:       PASS -> INCOMPLETE
      fi-cfl-8700k:       PASS -> INCOMPLETE
      fi-hsw-peppy:       PASS -> INCOMPLETE
      fi-pnv-d510:        PASS -> INCOMPLETE
      fi-hsw-4770r:       PASS -> INCOMPLETE
      fi-blb-e6850:       PASS -> INCOMPLETE
      fi-skl-6700k2:      PASS -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload-inject:
      fi-byt-j1900:       PASS -> INCOMPLETE (fdo#102657)
      fi-byt-n2820:       PASS -> INCOMPLETE (fdo#102657)
      fi-bxt-j4205:       PASS -> INCOMPLETE (fdo#103927)
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)
      fi-bdw-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-glk-j4005:       PASS -> INCOMPLETE (fdo#103359, k.org#198133)
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)
      fi-skl-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-skl-6600u:       PASS -> INCOMPLETE (fdo#104108)
      fi-skl-guc:         NOTRUN -> INCOMPLETE (fdo#106693)
      fi-cfl-guc:         PASS -> INCOMPLETE (fdo#106693)
      fi-elk-e7500:       PASS -> INCOMPLETE (fdo#103989)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-dpms:
      fi-skl-6700hq:      DMESG-WARN (fdo#105998) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      {fi-skl-iommu}:     FAIL (fdo#106686) -> SKIP +2

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

  fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106686 https://bugs.freedesktop.org/show_bug.cgi?id=106686
  fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (45 -> 42) ==

  Additional (2): fi-skl-guc fi-kbl-guc 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4545 -> IGTPW_1555

  CI_DRM_4466: 40ea4d696481930682c782e8dd7bd0cdbdfad574 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1555: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1555/
  IGT_4545: c3035d8cb11459f186f712d9c7ebb6734fc99831 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1555/issues.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:[~2018-07-11  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 18:11 [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Michał Winiarski
2018-07-09 18:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) Patchwork
2018-07-09 19:56 ` [igt-dev] [CI] igt/drv_module_reload: Revamp fault-injection Chris Wilson
2018-07-11  8:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt/drv_module_reload: Revamp fault-injection (rev6) 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.