Skip to contentSkip to conversation

tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests

PATCH In review Arjun Melkaveri 3 participants 3 messages Apr 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests

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]

---
 tests/i915/gem_ctx_persistence.c | 49 +++++++++++++++++---------------
 1 file changed, 26 insertions(+), 23 deletions(-)
tests/i915/gem_ctx_persistence.c +26 -23
index 00dda3a8..08cd2a89 100644
@@ -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
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ctx_persistence: Fixed assert issue seen for heartbeat-* tests

== Series Details ==

== 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@[email protected]

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@[email protected]

* 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@[email protected]

* 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@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-rkl-11600/igt@gem_exec_suspend@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-hsw-4770/igt@i915_selftest@[email protected]
- 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@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-snb-2600/igt@i915_selftest@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-tgl-u2/igt@kms_flip@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]

* 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@[email protected]
- fi-cml-u2: NOTRUN -> [SKIP][22] ([i915#3555])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@[email protected]

* 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@[email protected]
- fi-cml-u2: NOTRUN -> [SKIP][24] ([i915#3301])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cml-u2/igt@[email protected]

* 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@[email protected]
- 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@[email protected]

#### 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@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/bat-adlp-6/igt@kms_busy@[email protected]

* 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@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@kms_flip@[email protected]

* 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@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@[email protected]

* 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@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-cfl-8109u/igt@[email protected]

#### 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@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6910/fi-kbl-soraka/igt@[email protected]

{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

#2 lore raw
In reply to Arjun Melkaveri
Quoted 2 lines · Arjun Melkaveri

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?

Quoted 7 lines

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.

Quoted 17 lines
tests/i915/gem_ctx_persistence.c +3 -1
index 00dda3a8..08cd2a89 100644
@@ -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);

tests/i915/gem_ctx_persistence.c static void test_noheartbeat_many(int i915, int count, unsigned int flags) · line 494

Quoted 5 lines
tests/i915/gem_ctx_persistence.c +1 -1
@@ -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?

tests/i915/gem_ctx_persistence.c static void test_noheartbeat_many(int i915, int count, unsigned int flags) · line 498

Quoted 5 lines
tests/i915/gem_ctx_persistence.c +1 -1
 		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/ ?

Quoted 4 lines
tests/i915/gem_ctx_persistence.c +1 -1
 			continue;
 
-		if (!set_heartbeat(i915, e->full_name, 0))
+		if (!set_heartbeat(i915, e->name, 0))

tests/i915/gem_ctx_persistence.c static void test_noheartbeat_many(int i915, int count, unsigned int flags) · line 509

Quoted 10 lines
tests/i915/gem_ctx_persistence.c +2 -2
 			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.