public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug
@ 2019-03-16  3:49 Ashutosh Dixit
  2019-03-18 10:53 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ashutosh Dixit @ 2019-03-16  3:49 UTC (permalink / raw)
  To: igt-dev

For debug of audio issues in power management and driver reload tests,
additional kernel logs may be useful, both in dmesg as well as
ftrace. Add the infrastructure to generate these logs and enable these
logs for selected sub-tests.

At present igt_runner and other CI infrastructure does not capture the
ftrace buffer. Therefore, to avoid changes to igt_runner and the CI
infrastructure the ftrace buffer is dumped to stdout. This is done
after each sub-test so the ftrace output for a subtest can be
associated with that subtest.

Cc: Martin Peres <martin.peres@intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/igt_core.c                | 78 +++++++++++++++++++++++++++++++++++
 lib/igt_core.h                | 22 ++++++++++
 tests/i915/i915_module_load.c |  6 +--
 tests/i915/i915_pm_rpm.c      | 14 +++----
 tests/i915/i915_suspend.c     | 22 +++++-----
 5 files changed, 121 insertions(+), 21 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 6eb4798e..b371b8ec 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -2434,3 +2434,81 @@ err:
 
 	return -1;
 }
+
+static void igt_clear_ftrace_buf(void)
+{
+	system("echo > /sys/kernel/debug/tracing/trace");
+}
+
+static const char *audio_klog_en[] = {
+	"echo -n \"module *snd* +p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *soc* +p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *skl* +p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *hda* +p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *bxt* +p\" > /sys/kernel/debug/dynamic_debug/control",
+
+	"F=/sys/kernel/debug/tracing/events/sst/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/intel-sst/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/asoc/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/i2c/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda_controller/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda_intel/enable; \
+					[ -f $F ] && echo 1 > $F",
+	"echo 1 > /sys/kernel/debug/tracing/tracing_on",
+};
+
+bool igt_enable_audio_klog(void)
+{
+	int i;
+
+	igt_clear_ftrace_buf();
+
+	for (i = 0; i < sizeof(audio_klog_en)/sizeof(char*); i++)
+		system(audio_klog_en[i]);
+
+	return true;
+}
+
+static const char *audio_klog_dis[] = {
+	"echo -n \"module *snd* -p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *soc* -p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *skl* -p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *hda* -p\" > /sys/kernel/debug/dynamic_debug/control",
+	"echo -n \"module *bxt* -p\" > /sys/kernel/debug/dynamic_debug/control",
+
+	"F=/sys/kernel/debug/tracing/events/sst/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/intel-sst/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/asoc/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/i2c/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda_controller/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"F=/sys/kernel/debug/tracing/events/hda_intel/enable; \
+					[ -f $F ] && echo 0 > $F",
+	"echo 0 > /sys/kernel/debug/tracing/tracing_on",
+};
+
+void igt_disable_audio_klog(void)
+{
+	int i;
+
+	/* Dump ftrace buffer to stdout */
+	system("cat /sys/kernel/debug/tracing/trace");
+
+	for (i = 0; i < sizeof(audio_klog_dis)/sizeof(char*); i++)
+		system(audio_klog_dis[i]);
+
+	igt_clear_ftrace_buf();
+}
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 47ffd9e7..fbba6cf3 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -222,6 +222,28 @@ bool __igt_run_subtest(const char *subtest_name);
 #define igt_subtest_f(f...) \
 	__igt_subtest_f(igt_tokencat(__tmpchar, __LINE__), f)
 
+bool igt_enable_audio_klog(void);
+void igt_disable_audio_klog(void);
+
+/* Like igt_subtest but with extra kernel logs */
+#define igt_subtest_audio_klog(name) \
+	for (; __igt_run_subtest((name)) && igt_enable_audio_klog() && \
+		     ((sigsetjmp(igt_subtest_jmpbuf, 1) == 0) ? true : \
+		      (igt_disable_audio_klog(), false)); \
+	     igt_success())
+
+#define __igt_subtest_audio_klog_f(tmp, format...) \
+	for (char tmp [256]; \
+	     snprintf(tmp , sizeof(tmp), format), \
+		     __igt_run_subtest(tmp) && igt_enable_audio_klog() && \
+		     ((sigsetjmp(igt_subtest_jmpbuf, 1) == 0) ? true : \
+		      (igt_disable_audio_klog(), false)); \
+	     igt_success())
+
+/* Like igt_subtest_f but with extra kernel logs */
+#define igt_subtest_audio_klog_f(f...) \
+	__igt_subtest_audio_klog_f(igt_tokencat(__tmpchar, __LINE__), f)
+
 const char *igt_subtest_name(void);
 bool igt_only_list_subtests(void);
 
diff --git a/tests/i915/i915_module_load.c b/tests/i915/i915_module_load.c
index 7fe83520..dcbdd2dc 100644
--- a/tests/i915/i915_module_load.c
+++ b/tests/i915/i915_module_load.c
@@ -326,7 +326,7 @@ hda_dynamic_debug(bool enable)
 
 igt_main
 {
-	igt_subtest("reload") {
+	igt_subtest_audio_klog("reload") {
 		int load_error;
 
 		igt_i915_driver_unload();
@@ -343,7 +343,7 @@ igt_main
 		/* only default modparams, can leave module loaded */
 	}
 
-	igt_subtest("reload-no-display") {
+	igt_subtest_audio_klog("reload-no-display") {
 		igt_i915_driver_unload();
 
 		igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
@@ -351,7 +351,7 @@ igt_main
 		igt_i915_driver_unload();
 	}
 
-	igt_subtest("reload-with-fault-injection") {
+	igt_subtest_audio_klog("reload-with-fault-injection") {
 		int i = 0;
 
 		igt_i915_driver_unload();
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 759c76ea..03fa3806 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1967,7 +1967,7 @@ int main(int argc, char *argv[])
 	igt_subtest_init_parse_opts(&argc, argv, "", long_options,
 				    help_str, opt_handler, NULL);
 
-	igt_subtest("basic-rte") {
+	igt_subtest_audio_klog("basic-rte") {
 		igt_assert(setup_environment());
 		basic_subtest();
 	}
@@ -2064,15 +2064,15 @@ int main(int argc, char *argv[])
 				WAIT_STATUS | WAIT_EXTRA);
 
 	/* System suspend */
-	igt_subtest("system-suspend-devices")
+	igt_subtest_audio_klog("system-suspend-devices")
 		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
-	igt_subtest("system-suspend")
+	igt_subtest_audio_klog("system-suspend")
 		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
-	igt_subtest("system-suspend-execbuf")
+	igt_subtest_audio_klog("system-suspend-execbuf")
 		system_suspend_execbuf_subtest();
-	igt_subtest("system-suspend-modeset")
+	igt_subtest_audio_klog("system-suspend-modeset")
 		system_suspend_modeset_subtest();
-	igt_subtest("system-hibernate-devices")
+	igt_subtest_audio_klog("system-hibernate-devices")
 		system_suspend_subtest(SUSPEND_STATE_DISK,
 				       SUSPEND_TEST_DEVICES);
 	igt_subtest("system-hibernate")
@@ -2095,7 +2095,7 @@ int main(int argc, char *argv[])
 	igt_fixture
 		teardown_environment();
 
-	igt_subtest("module-reload") {
+	igt_subtest_audio_klog("module-reload") {
 		igt_debug("Reload w/o display\n");
 		igt_i915_driver_unload();
 		igt_assert_eq(igt_i915_driver_load("disable_display=1 mmio_debug=-1"), 0);
diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c
index cd7cf967..0235aa93 100644
--- a/tests/i915/i915_suspend.c
+++ b/tests/i915/i915_suspend.c
@@ -205,37 +205,37 @@ igt_main
 	igt_fixture
 		fd = drm_open_driver(DRIVER_INTEL);
 
-	igt_subtest("fence-restore-tiled2untiled")
+	igt_subtest_audio_klog("fence-restore-tiled2untiled")
 		test_fence_restore(fd, true, false);
 
-	igt_subtest("fence-restore-untiled")
+	igt_subtest_audio_klog("fence-restore-untiled")
 		test_fence_restore(fd, false, false);
 
-	igt_subtest("debugfs-reader")
+	igt_subtest_audio_klog("debugfs-reader")
 		test_debugfs_reader(false);
 
-	igt_subtest("sysfs-reader")
+	igt_subtest_audio_klog("sysfs-reader")
 		test_sysfs_reader(false);
 
-	igt_subtest("shrink")
+	igt_subtest_audio_klog("shrink")
 		test_shrink(fd, SUSPEND_STATE_MEM);
 
-	igt_subtest("forcewake")
+	igt_subtest_audio_klog("forcewake")
 		test_forcewake(fd, false);
 
-	igt_subtest("fence-restore-tiled2untiled-hibernate")
+	igt_subtest_audio_klog("fence-restore-tiled2untiled-hibernate")
 		test_fence_restore(fd, true, true);
 
-	igt_subtest("fence-restore-untiled-hibernate")
+	igt_subtest_audio_klog("fence-restore-untiled-hibernate")
 		test_fence_restore(fd, false, true);
 
-	igt_subtest("debugfs-reader-hibernate")
+	igt_subtest_audio_klog("debugfs-reader-hibernate")
 		test_debugfs_reader(true);
 
-	igt_subtest("sysfs-reader-hibernate")
+	igt_subtest_audio_klog("sysfs-reader-hibernate")
 		test_sysfs_reader(true);
 
-	igt_subtest("forcewake-hibernate")
+	igt_subtest_audio_klog("forcewake-hibernate")
 		test_forcewake(fd, true);
 
 	igt_fixture
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3)
  2019-03-16  3:49 [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Ashutosh Dixit
@ 2019-03-18 10:53 ` Patchwork
  2019-03-18 13:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-03-18 14:10 ` [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Jani Nikula
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-03-18 10:53 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

== Series Details ==

Series: lib/igt_core: Enable extra kernel logs for audio debug (rev3)
URL   : https://patchwork.freedesktop.org/series/57974/
State : success

== Summary ==

CI Bug Log - changes from IGT_4888 -> IGTPW_2645
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57974/revisions/3/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
    - fi-kbl-7567u:       NOTRUN -> SKIP [fdo#109271] +17

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@i915_module_load@reload:
    - fi-kbl-7567u:       PASS -> DMESG-WARN [fdo#105602] / [fdo#108529]

  * igt@i915_pm_rpm@module-reload:
    - fi-kbl-7567u:       NOTRUN -> DMESG-WARN [fdo#108529]

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7567u:       PASS -> DMESG-FAIL [fdo#105079]

  * igt@kms_chamelium@dp-edid-read:
    - fi-skl-iommu:       NOTRUN -> SKIP [fdo#109271] +45

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

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
    - fi-kbl-7567u:       PASS -> SKIP [fdo#109271] +33

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-whl-u:           PASS -> FAIL [fdo#103375] +3

  * igt@prime_vgem@basic-fence-flip:
    - fi-gdg-551:         PASS -> FAIL [fdo#103182]

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

  
#### Possible fixes ####

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

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

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         FAIL [fdo#104008] -> PASS

  
  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


Participating hosts (46 -> 40)
------------------------------

  Additional (1): fi-skl-iommu 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-bdw-samus 


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

    * IGT: IGT_4888 -> IGTPW_2645
    * Linux: CI_DRM_5756 -> CI_DRM_5763

  CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2645: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2645/
  IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3)
  2019-03-16  3:49 [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Ashutosh Dixit
  2019-03-18 10:53 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3) Patchwork
@ 2019-03-18 13:13 ` Patchwork
  2019-03-18 14:10 ` [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Jani Nikula
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-03-18 13:13 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: igt-dev

== Series Details ==

Series: lib/igt_core: Enable extra kernel logs for audio debug (rev3)
URL   : https://patchwork.freedesktop.org/series/57974/
State : success

== Summary ==

CI Bug Log - changes from IGT_4888_full -> IGTPW_2645_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/57974/revisions/3/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_big:
    - shard-hsw:          PASS -> TIMEOUT [fdo#107936]

  * igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@extended-modeset-hang-newfb-render-c:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#107956] +1

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

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

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

  * igt@kms_chv_cursor_fail@pipe-c-256x256-bottom-edge:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +8

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

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +12

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

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

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

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

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-glk:          NOTRUN -> FAIL [fdo#103167] / [fdo#105682]

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

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +5

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +5

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +104

  * igt@kms_psr@sprite_plane_onoff:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +10

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> FAIL [fdo#109016]

  * igt@sw_sync@sync_busy_fork_unixsocket:
    - shard-snb:          NOTRUN -> FAIL [fdo#110150 ]

  
#### Possible fixes ####

  * igt@gem_eio@reset-stress:
    - shard-snb:          FAIL [fdo#109661] -> PASS

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

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

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

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

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

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

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

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

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * {igt@kms_plane@pixel-format-pipe-a-planes-source-clamping}:
    - shard-apl:          FAIL [fdo#110033] -> PASS +1
    - shard-kbl:          FAIL [fdo#110127] -> PASS

  * {igt@kms_plane@pixel-format-pipe-c-planes-source-clamping}:
    - shard-glk:          SKIP [fdo#109271] -> PASS +1

  * {igt@kms_plane_multiple@atomic-pipe-b-tiling-none}:
    - shard-apl:          FAIL [fdo#110037] -> PASS +2

  * {igt@kms_plane_multiple@atomic-pipe-c-tiling-y}:
    - shard-glk:          FAIL [fdo#110037] -> PASS

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

  * igt@kms_vblank@pipe-c-ts-continuation-modeset:
    - shard-kbl:          FAIL [fdo#104894] -> PASS
    - shard-apl:          FAIL [fdo#104894] -> PASS

  
#### Warnings ####

  * igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
    - shard-glk:          FAIL [fdo#110098] -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> FAIL [fdo#110098]

  
  {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#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#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107936]: https://bugs.freedesktop.org/show_bug.cgi?id=107936
  [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#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#110033]: https://bugs.freedesktop.org/show_bug.cgi?id=110033
  [fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
  [fdo#110038]: https://bugs.freedesktop.org/show_bug.cgi?id=110038
  [fdo#110098]: https://bugs.freedesktop.org/show_bug.cgi?id=110098
  [fdo#110127]: https://bugs.freedesktop.org/show_bug.cgi?id=110127
  [fdo#110150 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110150 
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4888 -> IGTPW_2645
    * Linux: CI_DRM_5756 -> CI_DRM_5763

  CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2645: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2645/
  IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug
  2019-03-16  3:49 [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Ashutosh Dixit
  2019-03-18 10:53 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3) Patchwork
  2019-03-18 13:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-03-18 14:10 ` Jani Nikula
  2019-03-19  3:14   ` Ashutosh Dixit
  2 siblings, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2019-03-18 14:10 UTC (permalink / raw)
  To: Ashutosh Dixit, igt-dev

On Fri, 15 Mar 2019, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> For debug of audio issues in power management and driver reload tests,
> additional kernel logs may be useful, both in dmesg as well as
> ftrace. Add the infrastructure to generate these logs and enable these
> logs for selected sub-tests.
>
> At present igt_runner and other CI infrastructure does not capture the
> ftrace buffer. Therefore, to avoid changes to igt_runner and the CI
> infrastructure the ftrace buffer is dumped to stdout. This is done
> after each sub-test so the ftrace output for a subtest can be
> associated with that subtest.

Please always include a changelog compared to previous version. It's not
obvious there was a previous version.

Please always address the review comments! [1]

Another review comment: Please don't use system(). Implement this in C,
not shell script.


BR,
Jani.


[1] http://marc.info/?i=87bm2dix2u.fsf@intel.com


>
> Cc: Martin Peres <martin.peres@intel.com>
> Cc: Cezary Rojewski <cezary.rojewski@intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/igt_core.c                | 78 +++++++++++++++++++++++++++++++++++
>  lib/igt_core.h                | 22 ++++++++++
>  tests/i915/i915_module_load.c |  6 +--
>  tests/i915/i915_pm_rpm.c      | 14 +++----
>  tests/i915/i915_suspend.c     | 22 +++++-----
>  5 files changed, 121 insertions(+), 21 deletions(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 6eb4798e..b371b8ec 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -2434,3 +2434,81 @@ err:
>  
>  	return -1;
>  }
> +
> +static void igt_clear_ftrace_buf(void)
> +{
> +	system("echo > /sys/kernel/debug/tracing/trace");
> +}
> +
> +static const char *audio_klog_en[] = {
> +	"echo -n \"module *snd* +p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *soc* +p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *skl* +p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *hda* +p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *bxt* +p\" > /sys/kernel/debug/dynamic_debug/control",
> +
> +	"F=/sys/kernel/debug/tracing/events/sst/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/intel-sst/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/asoc/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/i2c/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda_controller/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda_intel/enable; \
> +					[ -f $F ] && echo 1 > $F",
> +	"echo 1 > /sys/kernel/debug/tracing/tracing_on",
> +};
> +
> +bool igt_enable_audio_klog(void)
> +{
> +	int i;
> +
> +	igt_clear_ftrace_buf();
> +
> +	for (i = 0; i < sizeof(audio_klog_en)/sizeof(char*); i++)
> +		system(audio_klog_en[i]);
> +
> +	return true;
> +}
> +
> +static const char *audio_klog_dis[] = {
> +	"echo -n \"module *snd* -p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *soc* -p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *skl* -p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *hda* -p\" > /sys/kernel/debug/dynamic_debug/control",
> +	"echo -n \"module *bxt* -p\" > /sys/kernel/debug/dynamic_debug/control",
> +
> +	"F=/sys/kernel/debug/tracing/events/sst/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/intel-sst/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/asoc/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/i2c/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda_controller/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"F=/sys/kernel/debug/tracing/events/hda_intel/enable; \
> +					[ -f $F ] && echo 0 > $F",
> +	"echo 0 > /sys/kernel/debug/tracing/tracing_on",
> +};
> +
> +void igt_disable_audio_klog(void)
> +{
> +	int i;
> +
> +	/* Dump ftrace buffer to stdout */
> +	system("cat /sys/kernel/debug/tracing/trace");
> +
> +	for (i = 0; i < sizeof(audio_klog_dis)/sizeof(char*); i++)
> +		system(audio_klog_dis[i]);
> +
> +	igt_clear_ftrace_buf();
> +}
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index 47ffd9e7..fbba6cf3 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -222,6 +222,28 @@ bool __igt_run_subtest(const char *subtest_name);
>  #define igt_subtest_f(f...) \
>  	__igt_subtest_f(igt_tokencat(__tmpchar, __LINE__), f)
>  
> +bool igt_enable_audio_klog(void);
> +void igt_disable_audio_klog(void);
> +
> +/* Like igt_subtest but with extra kernel logs */
> +#define igt_subtest_audio_klog(name) \
> +	for (; __igt_run_subtest((name)) && igt_enable_audio_klog() && \
> +		     ((sigsetjmp(igt_subtest_jmpbuf, 1) == 0) ? true : \
> +		      (igt_disable_audio_klog(), false)); \
> +	     igt_success())
> +
> +#define __igt_subtest_audio_klog_f(tmp, format...) \
> +	for (char tmp [256]; \
> +	     snprintf(tmp , sizeof(tmp), format), \
> +		     __igt_run_subtest(tmp) && igt_enable_audio_klog() && \
> +		     ((sigsetjmp(igt_subtest_jmpbuf, 1) == 0) ? true : \
> +		      (igt_disable_audio_klog(), false)); \
> +	     igt_success())
> +
> +/* Like igt_subtest_f but with extra kernel logs */
> +#define igt_subtest_audio_klog_f(f...) \
> +	__igt_subtest_audio_klog_f(igt_tokencat(__tmpchar, __LINE__), f)
> +
>  const char *igt_subtest_name(void);
>  bool igt_only_list_subtests(void);
>  
> diff --git a/tests/i915/i915_module_load.c b/tests/i915/i915_module_load.c
> index 7fe83520..dcbdd2dc 100644
> --- a/tests/i915/i915_module_load.c
> +++ b/tests/i915/i915_module_load.c
> @@ -326,7 +326,7 @@ hda_dynamic_debug(bool enable)
>  
>  igt_main
>  {
> -	igt_subtest("reload") {
> +	igt_subtest_audio_klog("reload") {
>  		int load_error;
>  
>  		igt_i915_driver_unload();
> @@ -343,7 +343,7 @@ igt_main
>  		/* only default modparams, can leave module loaded */
>  	}
>  
> -	igt_subtest("reload-no-display") {
> +	igt_subtest_audio_klog("reload-no-display") {
>  		igt_i915_driver_unload();
>  
>  		igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
> @@ -351,7 +351,7 @@ igt_main
>  		igt_i915_driver_unload();
>  	}
>  
> -	igt_subtest("reload-with-fault-injection") {
> +	igt_subtest_audio_klog("reload-with-fault-injection") {
>  		int i = 0;
>  
>  		igt_i915_driver_unload();
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index 759c76ea..03fa3806 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -1967,7 +1967,7 @@ int main(int argc, char *argv[])
>  	igt_subtest_init_parse_opts(&argc, argv, "", long_options,
>  				    help_str, opt_handler, NULL);
>  
> -	igt_subtest("basic-rte") {
> +	igt_subtest_audio_klog("basic-rte") {
>  		igt_assert(setup_environment());
>  		basic_subtest();
>  	}
> @@ -2064,15 +2064,15 @@ int main(int argc, char *argv[])
>  				WAIT_STATUS | WAIT_EXTRA);
>  
>  	/* System suspend */
> -	igt_subtest("system-suspend-devices")
> +	igt_subtest_audio_klog("system-suspend-devices")
>  		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
> -	igt_subtest("system-suspend")
> +	igt_subtest_audio_klog("system-suspend")
>  		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
> -	igt_subtest("system-suspend-execbuf")
> +	igt_subtest_audio_klog("system-suspend-execbuf")
>  		system_suspend_execbuf_subtest();
> -	igt_subtest("system-suspend-modeset")
> +	igt_subtest_audio_klog("system-suspend-modeset")
>  		system_suspend_modeset_subtest();
> -	igt_subtest("system-hibernate-devices")
> +	igt_subtest_audio_klog("system-hibernate-devices")
>  		system_suspend_subtest(SUSPEND_STATE_DISK,
>  				       SUSPEND_TEST_DEVICES);
>  	igt_subtest("system-hibernate")
> @@ -2095,7 +2095,7 @@ int main(int argc, char *argv[])
>  	igt_fixture
>  		teardown_environment();
>  
> -	igt_subtest("module-reload") {
> +	igt_subtest_audio_klog("module-reload") {
>  		igt_debug("Reload w/o display\n");
>  		igt_i915_driver_unload();
>  		igt_assert_eq(igt_i915_driver_load("disable_display=1 mmio_debug=-1"), 0);
> diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c
> index cd7cf967..0235aa93 100644
> --- a/tests/i915/i915_suspend.c
> +++ b/tests/i915/i915_suspend.c
> @@ -205,37 +205,37 @@ igt_main
>  	igt_fixture
>  		fd = drm_open_driver(DRIVER_INTEL);
>  
> -	igt_subtest("fence-restore-tiled2untiled")
> +	igt_subtest_audio_klog("fence-restore-tiled2untiled")
>  		test_fence_restore(fd, true, false);
>  
> -	igt_subtest("fence-restore-untiled")
> +	igt_subtest_audio_klog("fence-restore-untiled")
>  		test_fence_restore(fd, false, false);
>  
> -	igt_subtest("debugfs-reader")
> +	igt_subtest_audio_klog("debugfs-reader")
>  		test_debugfs_reader(false);
>  
> -	igt_subtest("sysfs-reader")
> +	igt_subtest_audio_klog("sysfs-reader")
>  		test_sysfs_reader(false);
>  
> -	igt_subtest("shrink")
> +	igt_subtest_audio_klog("shrink")
>  		test_shrink(fd, SUSPEND_STATE_MEM);
>  
> -	igt_subtest("forcewake")
> +	igt_subtest_audio_klog("forcewake")
>  		test_forcewake(fd, false);
>  
> -	igt_subtest("fence-restore-tiled2untiled-hibernate")
> +	igt_subtest_audio_klog("fence-restore-tiled2untiled-hibernate")
>  		test_fence_restore(fd, true, true);
>  
> -	igt_subtest("fence-restore-untiled-hibernate")
> +	igt_subtest_audio_klog("fence-restore-untiled-hibernate")
>  		test_fence_restore(fd, false, true);
>  
> -	igt_subtest("debugfs-reader-hibernate")
> +	igt_subtest_audio_klog("debugfs-reader-hibernate")
>  		test_debugfs_reader(true);
>  
> -	igt_subtest("sysfs-reader-hibernate")
> +	igt_subtest_audio_klog("sysfs-reader-hibernate")
>  		test_sysfs_reader(true);
>  
> -	igt_subtest("forcewake-hibernate")
> +	igt_subtest_audio_klog("forcewake-hibernate")
>  		test_forcewake(fd, true);
>  
>  	igt_fixture

-- 
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] 5+ messages in thread

* Re: [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug
  2019-03-18 14:10 ` [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Jani Nikula
@ 2019-03-19  3:14   ` Ashutosh Dixit
  0 siblings, 0 replies; 5+ messages in thread
From: Ashutosh Dixit @ 2019-03-19  3:14 UTC (permalink / raw)
  To: Jani Nikula; +Cc: igt-dev

On Mon, 18 Mar 2019 07:10:21 -0700, Jani Nikula wrote:
>
> On Fri, 15 Mar 2019, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> > For debug of audio issues in power management and driver reload tests,
> > additional kernel logs may be useful, both in dmesg as well as
> > ftrace. Add the infrastructure to generate these logs and enable these
> > logs for selected sub-tests.
> >
> > At present igt_runner and other CI infrastructure does not capture the
> > ftrace buffer. Therefore, to avoid changes to igt_runner and the CI
> > infrastructure the ftrace buffer is dumped to stdout. This is done
> > after each sub-test so the ftrace output for a subtest can be
> > associated with that subtest.
>
> Please always include a changelog compared to previous version. It's not
> obvious there was a previous version.

Sorry, this was a CI only patch (with CI in the subject) which I pushed
since v1 had broken CI. But yes, I will include the changelog in future
versions.

> Please always address the review comments! [1]

> Another review comment: Please don't use system(). Implement this in C,
> not shell script.
>
> BR,
> Jani.
>
> [1] http://marc.info/?i=87bm2dix2u.fsf@intel.com

Yes, will address the previous and present review comments and reply to
your previous email soon. Thanks!
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-03-19  3:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-16  3:49 [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Ashutosh Dixit
2019-03-18 10:53 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_core: Enable extra kernel logs for audio debug (rev3) Patchwork
2019-03-18 13:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-18 14:10 ` [igt-dev] [CI] lib/igt_core: Enable extra kernel logs for audio debug Jani Nikula
2019-03-19  3:14   ` Ashutosh Dixit

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