diff mbox series

drm/i915/selftests: Be loud if we run out of time

Message ID 20180808085755.3672-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915/selftests: Be loud if we run out of time | expand

Commit Message

Chris Wilson Aug. 8, 2018, 8:57 a.m. UTC
On flushing the tests, we do so with a timeout to prevent waiting
indefinitely. However, if we miss an interrupt, the timeout provides a
safety net that still completes successfully (as we check the completion
condition after reaching the timeout and see all is well). This safety
net can unfortunately mask some bugs, so let's add a warning here so we
don't just ignore it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/selftests/igt_flush_test.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Chris Wilson Aug. 8, 2018, 9:33 a.m. UTC | #1
Quoting Patchwork (2018-08-08 10:30:10)
> == Series Details ==
> 
> Series: drm/i915/selftests: Be loud if we run out of time
> URL   : https://patchwork.freedesktop.org/series/47864/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_4632 -> Patchwork_9879 =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_9879 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_9879, 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/47864/revisions/1/mbox/
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_9879:
> 
>   === IGT changes ===
> 
>     ==== Possible regressions ====
> 
>     igt@drv_selftest@live_hangcheck:
>       fi-snb-2520m:       PASS -> DMESG-WARN
>       {fi-bdw-samus}:     PASS -> DMESG-WARN
>       {fi-kbl-8809g}:     PASS -> DMESG-WARN
>       fi-hsw-peppy:       PASS -> DMESG-WARN
>       fi-cnl-psr:         PASS -> DMESG-WARN
>       fi-kbl-7500u:       PASS -> DMESG-WARN
>       fi-hsw-4770r:       PASS -> DMESG-WARN
>       fi-kbl-7560u:       PASS -> DMESG-WARN
>       fi-bdw-5557u:       PASS -> DMESG-WARN
>       fi-skl-6700hq:      PASS -> DMESG-WARN
>       fi-skl-gvtdvm:      PASS -> DMESG-WARN
>       fi-skl-6700k2:      PASS -> DMESG-WARN
>       fi-elk-e7500:       PASS -> DMESG-WARN
>       fi-byt-j1900:       PASS -> DMESG-WARN
>       fi-blb-e6850:       PASS -> DMESG-WARN
>       fi-cfl-guc:         PASS -> DMESG-FAIL
>       fi-skl-6600u:       PASS -> DMESG-WARN
>       fi-pnv-d510:        PASS -> DMESG-WARN
>       {fi-bsw-kefka}:     PASS -> DMESG-WARN
>       fi-cfl-8700k:       PASS -> DMESG-WARN
>       fi-kbl-r:           PASS -> DMESG-WARN
>       fi-byt-n2820:       PASS -> DMESG-WARN
>       {fi-byt-clapper}:   PASS -> DMESG-WARN
>       {fi-cfl-8109u}:     PASS -> DMESG-WARN
>       fi-kbl-guc:         PASS -> DMESG-WARN
>       fi-cfl-s3:          PASS -> DMESG-WARN
>       fi-bwr-2160:        PASS -> DMESG-WARN
>       fi-snb-2600:        PASS -> DMESG-WARN
>       fi-skl-6770hq:      PASS -> DMESG-WARN
>       fi-whl-u:           PASS -> DMESG-WARN
>       fi-ivb-3520m:       PASS -> DMESG-WARN
>       fi-hsw-4770:        PASS -> DMESG-WARN
>       fi-bxt-dsi:         PASS -> DMESG-WARN
>       fi-bxt-j4205:       PASS -> DMESG-WARN
>       {fi-skl-iommu}:     PASS -> DMESG-WARN
>       fi-glk-j4005:       PASS -> DMESG-WARN
>       fi-ivb-3770:        PASS -> DMESG-WARN
>       fi-ilk-650:         PASS -> DMESG-WARN
>       fi-bsw-n3050:       PASS -> DMESG-WARN
>       fi-bdw-gvtdvm:      PASS -> DMESG-WARN
>       fi-kbl-x1275:       PASS -> DMESG-WARN
>       fi-kbl-7567u:       PASS -> DMESG-WARN
>       fi-glk-dsi:         PASS -> DMESG-WARN

Uh oh, that's worse than I thought.

Something in the test setup is disabling interrupts? Maybe.
-Chris
Chris Wilson Aug. 8, 2018, 9:49 a.m. UTC | #2
Quoting Chris Wilson (2018-08-08 10:33:56)
> Quoting Patchwork (2018-08-08 10:30:10)
> > == Series Details ==
> > 
> > Series: drm/i915/selftests: Be loud if we run out of time
> > URL   : https://patchwork.freedesktop.org/series/47864/
> > State : failure
> > 
> > == Summary ==
> > 
> > = CI Bug Log - changes from CI_DRM_4632 -> Patchwork_9879 =
> > 
> > == Summary - FAILURE ==
> > 
> >   Serious unknown changes coming with Patchwork_9879 absolutely need to be
> >   verified manually.
> >   
> >   If you think the reported changes have nothing to do with the changes
> >   introduced in Patchwork_9879, 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/47864/revisions/1/mbox/
> > 
> > == Possible new issues ==
> > 
> >   Here are the unknown changes that may have been introduced in Patchwork_9879:
> > 
> >   === IGT changes ===
> > 
> >     ==== Possible regressions ====
> > 
> >     igt@drv_selftest@live_hangcheck:
> >       fi-snb-2520m:       PASS -> DMESG-WARN
> >       {fi-bdw-samus}:     PASS -> DMESG-WARN
> >       {fi-kbl-8809g}:     PASS -> DMESG-WARN
> >       fi-hsw-peppy:       PASS -> DMESG-WARN
> >       fi-cnl-psr:         PASS -> DMESG-WARN
> >       fi-kbl-7500u:       PASS -> DMESG-WARN
> >       fi-hsw-4770r:       PASS -> DMESG-WARN
> >       fi-kbl-7560u:       PASS -> DMESG-WARN
> >       fi-bdw-5557u:       PASS -> DMESG-WARN
> >       fi-skl-6700hq:      PASS -> DMESG-WARN
> >       fi-skl-gvtdvm:      PASS -> DMESG-WARN
> >       fi-skl-6700k2:      PASS -> DMESG-WARN
> >       fi-elk-e7500:       PASS -> DMESG-WARN
> >       fi-byt-j1900:       PASS -> DMESG-WARN
> >       fi-blb-e6850:       PASS -> DMESG-WARN
> >       fi-cfl-guc:         PASS -> DMESG-FAIL
> >       fi-skl-6600u:       PASS -> DMESG-WARN
> >       fi-pnv-d510:        PASS -> DMESG-WARN
> >       {fi-bsw-kefka}:     PASS -> DMESG-WARN
> >       fi-cfl-8700k:       PASS -> DMESG-WARN
> >       fi-kbl-r:           PASS -> DMESG-WARN
> >       fi-byt-n2820:       PASS -> DMESG-WARN
> >       {fi-byt-clapper}:   PASS -> DMESG-WARN
> >       {fi-cfl-8109u}:     PASS -> DMESG-WARN
> >       fi-kbl-guc:         PASS -> DMESG-WARN
> >       fi-cfl-s3:          PASS -> DMESG-WARN
> >       fi-bwr-2160:        PASS -> DMESG-WARN
> >       fi-snb-2600:        PASS -> DMESG-WARN
> >       fi-skl-6770hq:      PASS -> DMESG-WARN
> >       fi-whl-u:           PASS -> DMESG-WARN
> >       fi-ivb-3520m:       PASS -> DMESG-WARN
> >       fi-hsw-4770:        PASS -> DMESG-WARN
> >       fi-bxt-dsi:         PASS -> DMESG-WARN
> >       fi-bxt-j4205:       PASS -> DMESG-WARN
> >       {fi-skl-iommu}:     PASS -> DMESG-WARN
> >       fi-glk-j4005:       PASS -> DMESG-WARN
> >       fi-ivb-3770:        PASS -> DMESG-WARN
> >       fi-ilk-650:         PASS -> DMESG-WARN
> >       fi-bsw-n3050:       PASS -> DMESG-WARN
> >       fi-bdw-gvtdvm:      PASS -> DMESG-WARN
> >       fi-kbl-x1275:       PASS -> DMESG-WARN
> >       fi-kbl-7567u:       PASS -> DMESG-WARN
> >       fi-glk-dsi:         PASS -> DMESG-WARN
> 
> Uh oh, that's worse than I thought.
> 
> Something in the test setup is disabling interrupts? Maybe.

Simpler. The wait_for_idle is an int error return not the long timeout
return. Silly me,
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
index af66e3d4e23a..da620ed7cc36 100644
--- a/drivers/gpu/drm/i915/selftests/igt_flush_test.c
+++ b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
@@ -19,7 +19,8 @@  int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
 		i915_gem_set_wedged(i915);
 	}
 
-	if (i915_gem_wait_for_idle(i915, flags, HZ / 5) == -ETIME) {
+	switch (i915_gem_wait_for_idle(i915, flags, HZ / 5)) {
+	case -ETIME:
 		pr_err("%pS timed out, cancelling all further testing.\n",
 		       __builtin_return_address(0));
 
@@ -27,6 +28,12 @@  int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
 		GEM_TRACE_DUMP();
 
 		i915_gem_set_wedged(i915);
+		break;
+
+	case 0:
+		pr_err("%pS missed idle-completion interrupt\n",
+		       __builtin_return_address(0));
+		break;
 	}
 
 	return i915_terminally_wedged(&i915->gpu_error) ? -EIO : 0;