Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests
@ 2022-04-08 16:56 Arjun Melkaveri
  2022-04-08 19:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2022-04-08 21:17 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
  0 siblings, 2 replies; 3+ messages in thread
From: Arjun Melkaveri @ 2022-04-08 16:56 UTC (permalink / raw)
  To: arjun.melkaveri, ashutosh.dixit, igt-dev

heartbeat-* tests were failing with assert mentioned below.
Issue got fixed by moving for_each_physical_ring to
for_each_ctx_cfg_engine, and creating right ctx .

Issue :-
Stack trace:
  #0 ../lib/igt_core.c:1756 __igt_fail_assert()
  #1 ../tests/i915/gem_ctx_persistence.c:589 test_noheartbeat_close()
  #2 [<unknown>+0x0]

Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/i915/gem_ctx_persistence.c | 49 +++++++++++++++++---------------
 1 file changed, 26 insertions(+), 23 deletions(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index 00dda3a8..08cd2a89 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -476,8 +476,10 @@ static bool set_preempt_timeout(int i915, const char *name, unsigned int value)
 	return true;
 }
 
-static void test_noheartbeat_many(int i915, int count, unsigned int flags)
+static void test_noheartbeat_many(int i915, const intel_ctx_cfg_t *cfg,
+				  int count, unsigned int flags)
 {
+	const struct intel_execution_engine2 *e;
 	unsigned long checked = 0;
 
 	cleanup(i915);
@@ -489,25 +491,25 @@ static void test_noheartbeat_many(int i915, int count, unsigned int flags)
 	 * cleaned up.
 	 */
 
-	for_each_physical_ring(e, i915) {
+	for_each_ctx_cfg_engine(i915, cfg, e) {
 		igt_spin_t *spin[count];
 		uint64_t ahnd;
 
-		if (!set_preempt_timeout(i915, e->full_name, 250))
+		if (!set_preempt_timeout(i915, e->name, 250))
 			continue;
 
-		if (!set_heartbeat(i915, e->full_name, 0))
+		if (!set_heartbeat(i915, e->name, 0))
 			continue;
 
-		igt_assert(set_heartbeat(i915, e->full_name, 500));
+		igt_assert(set_heartbeat(i915, e->name, 500));
 
 		for (int n = 0; n < ARRAY_SIZE(spin); n++) {
 			const intel_ctx_t *ctx;
 
-			ctx = intel_ctx_create(i915, NULL);
+			ctx = ctx_create_persistence(i915, cfg, false);
 			ahnd = get_reloc_ahnd(i915, ctx->id);
 			spin[n] = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
-					       .engine = eb_ring(e),
+					       .engine = e->flags,
 					       .flags = (IGT_SPIN_FENCE_OUT |
 							 IGT_SPIN_POLL_RUN |
 							 flags));
@@ -515,8 +517,8 @@ static void test_noheartbeat_many(int i915, int count, unsigned int flags)
 		}
 		igt_spin_busywait_until_started(spin[0]);
 
-		igt_debug("Testing %s\n", e->full_name);
-		igt_assert(set_heartbeat(i915, e->full_name, 0));
+		igt_debug("Testing %s\n", e->name);
+		igt_assert(set_heartbeat(i915, e->name, 0));
 
 		for (int n = 0; n < ARRAY_SIZE(spin); n++) {
 			igt_assert_eq(wait_for_status(spin[n]->out_fence, reset_timeout_ms),
@@ -529,15 +531,16 @@ static void test_noheartbeat_many(int i915, int count, unsigned int flags)
 			put_ahnd(ahnd);
 		}
 
-		set_heartbeat(i915, e->full_name, 2500);
+		set_heartbeat(i915, e->name, 2500);
 		cleanup(i915);
 		checked++;
 	}
 	igt_require(checked);
 }
 
-static void test_noheartbeat_close(int i915, unsigned int flags)
+static void test_noheartbeat_close(int i915, const intel_ctx_cfg_t *cfg, unsigned int flags)
 {
+	const struct intel_execution_engine2 *e;
 	unsigned long checked = 0;
 
 	cleanup(i915);
@@ -549,32 +552,32 @@ static void test_noheartbeat_close(int i915, unsigned int flags)
 	 * heartbeat has already been disabled.
 	 */
 
-	for_each_physical_ring(e, i915) {
+	for_each_ctx_cfg_engine(i915, cfg, e) {
 		igt_spin_t *spin;
 		const intel_ctx_t *ctx;
 		uint64_t ahnd;
 		int err;
 
-		if (!set_preempt_timeout(i915, e->full_name, 250))
+		if (!set_preempt_timeout(i915, e->name, 250))
 			continue;
 
-		if (!set_heartbeat(i915, e->full_name, 0))
+		if (!set_heartbeat(i915, e->name, 0))
 			continue;
 
-		ctx = intel_ctx_create(i915, NULL);
+		ctx = ctx_create_persistence(i915, cfg, false);
 		ahnd = get_reloc_ahnd(i915, ctx->id);
 		spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
-				    .engine = eb_ring(e),
+				    .engine = e->flags,
 				    .flags = (IGT_SPIN_FENCE_OUT |
 					      IGT_SPIN_POLL_RUN |
 					      flags));
 		igt_spin_busywait_until_started(spin);
 
-		igt_debug("Testing %s\n", e->full_name);
+		igt_debug("Testing %s\n", e->name);
 		intel_ctx_destroy(i915, ctx);
 		err = wait_for_status(spin->out_fence, reset_timeout_ms);
 
-		set_heartbeat(i915, e->full_name, 2500);
+		set_heartbeat(i915, e->name, 2500);
 		igt_spin_free(i915, spin);
 		put_ahnd(ahnd);
 
@@ -1293,15 +1296,15 @@ igt_main
 		test_nohangcheck_hang(i915, &empty_cfg);
 
 	igt_subtest("heartbeat-stop")
-		test_noheartbeat_many(i915, 1, 0);
+		test_noheartbeat_many(i915, &empty_cfg, 1, 0);
 	igt_subtest("heartbeat-hang")
-		test_noheartbeat_many(i915, 1, IGT_SPIN_NO_PREEMPTION);
+		test_noheartbeat_many(i915, &empty_cfg, 1, IGT_SPIN_NO_PREEMPTION);
 	igt_subtest("heartbeat-many")
-		test_noheartbeat_many(i915, 16, 0);
+		test_noheartbeat_many(i915, &empty_cfg, 16, 0);
 	igt_subtest("heartbeat-close")
-		test_noheartbeat_close(i915, 0);
+		test_noheartbeat_close(i915, &empty_cfg, 0);
 	igt_subtest("heartbeat-hostile")
-		test_noheartbeat_close(i915, IGT_SPIN_NO_PREEMPTION);
+		test_noheartbeat_close(i915, &empty_cfg, IGT_SPIN_NO_PREEMPTION);
 
 	igt_subtest_group {
 		igt_fixture
-- 
2.25.1

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

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests
  2022-04-08 16:56 [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests Arjun Melkaveri
@ 2022-04-08 19:26 ` Patchwork
  2022-04-08 21:17 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2022-04-08 19:26 UTC (permalink / raw)
  To: Arjun Melkaveri; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 11590 bytes --]

== Series Details ==

Series: tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests
URL   : https://patchwork.freedesktop.org/series/102426/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11478 -> IGTPW_6910
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_6910 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_6910, 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_6910/index.html

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

  Additional (3): bat-rpls-1 fi-cml-u2 fi-pnv-d510 
  Missing    (3): bat-hsw-1 fi-bsw-cyan fi-bdw-samus 

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@mman:
    - fi-bdw-5557u:       NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-bdw-5557u/igt@i915_selftest@live@mman.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-cml-u2:          NOTRUN -> [DMESG-WARN][2] ([i915#5437])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@core_hotunplug@unbind-rebind.html

  * igt@gem_exec_fence@basic-busy@bcs0:
    - fi-cml-u2:          NOTRUN -> [SKIP][3] ([i915#1208]) +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@gem_exec_fence@basic-busy@bcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
    - fi-rkl-11600:       [PASS][4] -> [INCOMPLETE][5] ([i915#5127])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@gem_huc_copy@huc-copy:
    - fi-cml-u2:          NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-cml-u2:          NOTRUN -> [SKIP][7] ([i915#4613]) +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [PASS][8] -> [INCOMPLETE][9] ([i915#4785])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
    - fi-snb-2600:        [PASS][10] -> [INCOMPLETE][11] ([i915#3921])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][12] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-bdw-5557u/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-cml-u2:          NOTRUN -> [SKIP][13] ([fdo#109284] / [fdo#111827]) +8 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-cml-u2:          NOTRUN -> [SKIP][14] ([fdo#109278]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_flip@basic-flip-vs-dpms@a-edp1:
    - fi-tgl-u2:          [PASS][15] -> [DMESG-WARN][16] ([i915#402])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-tgl-u2/igt@kms_flip@basic-flip-vs-dpms@a-edp1.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-tgl-u2/igt@kms_flip@basic-flip-vs-dpms@a-edp1.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-cml-u2:          NOTRUN -> [SKIP][17] ([fdo#109285])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          NOTRUN -> [DMESG-WARN][18] ([i915#4269])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
    - fi-pnv-d510:        NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#5341])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-pnv-d510/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-cml-u2:          NOTRUN -> [SKIP][20] ([fdo#109278] / [i915#533])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][21] ([fdo#109271]) +14 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-bdw-5557u/igt@kms_setmode@basic-clone-single-crtc.html
    - fi-cml-u2:          NOTRUN -> [SKIP][22] ([i915#3555])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-userptr:
    - fi-pnv-d510:        NOTRUN -> [SKIP][23] ([fdo#109271]) +57 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-pnv-d510/igt@prime_vgem@basic-userptr.html
    - fi-cml-u2:          NOTRUN -> [SKIP][24] ([i915#3301])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-hsw-4770:        NOTRUN -> [FAIL][25] ([fdo#109271] / [i915#2722] / [i915#4312] / [i915#5594])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-hsw-4770/igt@runner@aborted.html
    - fi-cml-u2:          NOTRUN -> [FAIL][26] ([i915#4312] / [i915#5257])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@debugfs_test@read_all_entries:
    - fi-kbl-soraka:      [DMESG-WARN][27] ([i915#1982]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html

  * igt@kms_busy@basic@modeset:
    - {bat-adlp-6}:       [DMESG-WARN][29] ([i915#3576]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/bat-adlp-6/igt@kms_busy@basic@modeset.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/bat-adlp-6/igt@kms_busy@basic@modeset.html

  * igt@kms_flip@basic-plain-flip@c-dp2:
    - fi-cfl-8109u:       [DMESG-WARN][31] ([i915#165]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp2.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@kms_flip@basic-plain-flip@c-dp2.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
    - fi-cfl-8109u:       [DMESG-WARN][33] ([i915#165] / [i915#62]) -> [PASS][34] +13 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
    - fi-cfl-8109u:       [DMESG-WARN][35] ([i915#165] / [i915#5341] / [i915#62]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html

  
#### Warnings ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-kbl-soraka:      [DMESG-WARN][37] ([i915#5437]) -> [DMESG-WARN][38] ([i915#1982] / [i915#5437])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11478/fi-kbl-soraka/igt@core_hotunplug@unbind-rebind.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-kbl-soraka/igt@core_hotunplug@unbind-rebind.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1208]: https://gitlab.freedesktop.org/drm/intel/issues/1208
  [i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#5127]: https://gitlab.freedesktop.org/drm/intel/issues/5127
  [i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5341]: https://gitlab.freedesktop.org/drm/intel/issues/5341
  [i915#5437]: https://gitlab.freedesktop.org/drm/intel/issues/5437
  [i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6415 -> IGTPW_6910

  CI-20190529: 20190529
  CI_DRM_11478: 83f578bb5d0e9cb3c7c34151aa868f1642a202a8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6910: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/index.html
  IGT_6415: c3b690bd5f7fb1fb7ed786ab0f3b815930a6a55f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/index.html

[-- Attachment #2: Type: text/html, Size: 13462 bytes --]

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

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests
  2022-04-08 16:56 [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests Arjun Melkaveri
  2022-04-08 19:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2022-04-08 21:17 ` Dixit, Ashutosh
  1 sibling, 0 replies; 3+ messages in thread
From: Dixit, Ashutosh @ 2022-04-08 21:17 UTC (permalink / raw)
  To: Arjun Melkaveri; +Cc: igt-dev

On Fri, 08 Apr 2022 09:56:43 -0700, Arjun Melkaveri wrote:
>
> heartbeat-* tests were failing with assert mentioned below.

Failing where? GuC or non-GuC? If it's GuC maybe tests are supposed to fail
since GuC doesn't support persistence properly?

> Issue got fixed by moving for_each_physical_ring to
> for_each_ctx_cfg_engine, and creating right ctx .
>
> Issue :-
> Stack trace:
>   #0 ../lib/igt_core.c:1756 __igt_fail_assert()
>   #1 ../tests/i915/gem_ctx_persistence.c:589 test_noheartbeat_close()

There is no assert on this line.

> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index 00dda3a8..08cd2a89 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -476,8 +476,10 @@ static bool set_preempt_timeout(int i915, const char *name, unsigned int value)
>	return true;
>  }
>
> -static void test_noheartbeat_many(int i915, int count, unsigned int flags)
> +static void test_noheartbeat_many(int i915, const intel_ctx_cfg_t *cfg,
> +				  int count, unsigned int flags)
>  {
> +	const struct intel_execution_engine2 *e;
>	unsigned long checked = 0;
>
>	cleanup(i915);
> @@ -489,25 +491,25 @@ static void test_noheartbeat_many(int i915, int count, unsigned int flags)
>	 * cleaned up.
>	 */
>
> -	for_each_physical_ring(e, i915) {
> +	for_each_ctx_cfg_engine(i915, cfg, e) {

But why? With an empty context these two lines are close to equivalent, so
why change it?

>		igt_spin_t *spin[count];
>		uint64_t ahnd;
>
> -		if (!set_preempt_timeout(i915, e->full_name, 250))
> +		if (!set_preempt_timeout(i915, e->name, 250))

Whey s/full_name/name/ ?

>			continue;
>
> -		if (!set_heartbeat(i915, e->full_name, 0))
> +		if (!set_heartbeat(i915, e->name, 0))
>			continue;
>
> -		igt_assert(set_heartbeat(i915, e->full_name, 500));
> +		igt_assert(set_heartbeat(i915, e->name, 500));
>
>		for (int n = 0; n < ARRAY_SIZE(spin); n++) {
>			const intel_ctx_t *ctx;
>
> -			ctx = intel_ctx_create(i915, NULL);
> +			ctx = ctx_create_persistence(i915, cfg, false);

Just above the comment says this:

        /*
         * If the user disables the heartbeat, after leaving behind
         * a number of long running *persistent* contexts, check they get
         * cleaned up.
         */

So now we are changing the context to be non-persistent, thereby changing
the test to make it pass?

So let's try to first figure out why the tests are failing and what we are
trying to fix.

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

end of thread, other threads:[~2022-04-08 21:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 16:56 [igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests Arjun Melkaveri
2022-04-08 19:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2022-04-08 21:17 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh

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