Skip to contentSkip to conversation

tests/kms_chamelium: chatty connector status assertions

PATCH In review Simon Ser 3 participants 5 messages Jul 23, 2019 – Aug 15, 2019

lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 tests/kms_chamelium: chatty connector status assertions

This commit adds an error message to connector status assertions.

---

I'll update the CI filters.

 tests/kms_chamelium.c | 44 ++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)
tests/kms_chamelium.c +31 -13
index b7d30a2d0f55..0dc26e7274dc 100644
@@ -118,15 +118,25 @@ reprobe_connector(data_t *data, struct chamelium_port *port)
 	return status;
 }
 
+static const char *connection_str(drmModeConnection c)
+{
+	switch (c) {
+	case DRM_MODE_CONNECTED:
+		return "connected";
+	case DRM_MODE_DISCONNECTED:
+		return "disconnected";
+	case DRM_MODE_UNKNOWNCONNECTION:
+		return "unknown";
+	}
+	assert(0); /* unreachable */
+}
+
 static void
 wait_for_connector(data_t *data, struct chamelium_port *port,
 		   drmModeConnection status)
 {
-	bool finished = false;
-
-	igt_debug("Waiting for %s to %sconnect...\n",
-		  chamelium_port_get_name(port),
-		  status == DRM_MODE_DISCONNECTED ? "dis" : "");
+	igt_debug("Waiting for %s to get %s...\n",
+		  chamelium_port_get_name(port), connection_str(status));
 
 	/*
 	 * Rely on simple reprobing so we don't fail tests that don't require
@@ -134,14 +144,14 @@ wait_for_connector(data_t *data, struct chamelium_port *port,
 	 */
 	igt_until_timeout(HOTPLUG_TIMEOUT) {
 		if (reprobe_connector(data, port) == status) {
-			finished = true;
 			return;
 		}
 
 		usleep(50000);
 	}
 
-	igt_assert(finished);
+	igt_assert_f(false, "Timed out waiting for %s to get %s\n",
+		  chamelium_port_get_name(port), connection_str(status));
 }
 
 static int chamelium_vga_modes[][2] = {
@@ -234,6 +244,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
 {
 	struct udev_monitor *mon = igt_watch_hotplug();
 	int i;
+	drmModeConnection status;
 
 	reset_state(data, NULL);
 	igt_hpd_storm_set_threshold(data->drm_fd, 0);
@@ -243,17 +254,24 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
 
 		/* Check if we get a sysfs hotplug event */
 		chamelium_plug(data->chamelium, port);
-		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
-		igt_assert_eq(reprobe_connector(data, port),
-			      DRM_MODE_CONNECTED);
+		igt_assert_f(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT),
+			     "Timed out waiting for hotplug uevent\n");
+		status = reprobe_connector(data, port);
+		igt_assert_f(status == DRM_MODE_CONNECTED,
+			     "Invalid connector status after hotplug: "
+			     "got %s, expected connected\n",
+			     connection_str(status));
 
 		igt_flush_hotplugs(mon);
 
 		/* Now check if we get a hotplug from disconnection */
 		chamelium_unplug(data->chamelium, port);
-		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
-		igt_assert_eq(reprobe_connector(data, port),
-			      DRM_MODE_DISCONNECTED);
+		igt_assert_f(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT),
+			     "Timed out waiting for unplug uevent\n");
+		igt_assert_f(status == DRM_MODE_DISCONNECTED,
+			     "Invalid connector status after hotplug: "
+			     "got %s, expected disconnected\n",
+			     connection_str(status));
 	}
 
 	igt_cleanup_hotplug(mon);

--
2.22.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#1 lore raw

[igt-dev] ✗ GitLab.Pipeline: warning for tests/kms_chamelium: chatty connector status assertions

== Series Details ==

== Series Details ==

Series: tests/kms_chamelium: chatty connector status assertions
URL : https://patchwork.freedesktop.org/series/64087/
State : warning

== Summary ==

Pipeline status: FAILED.

See https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/50640 for more details.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/50640
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: chatty connector status assertions

In reply to Simon Ser
== Series Details ==

== Series Details ==

Series: tests/kms_chamelium: chatty connector status assertions
URL : https://patchwork.freedesktop.org/series/64087/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6540 -> IGTPW_3286
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_3286 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_3286, 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/64087/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@dp-hpd-fast:
- fi-cml-u2: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-cml-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-cml-u2/igt@[email protected]
- fi-kbl-7500u: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [PASS][5] -> [FAIL][6] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@[email protected]
- fi-skl-6700k2: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-skl-6700k2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-skl-6700k2/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][9] ([fdo#109485]) -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@[email protected]
- fi-kbl-7567u: [FAIL][11] ([fdo#109485]) -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7567u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7567u/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@kms_chamelium@hdmi-crc-fast:
- {fi-icl-u4}: [FAIL][13] ([fdo#111045] / [fdo#111046 ]) -> [FAIL][14] +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-u4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u4/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic-files:
- fi-icl-dsi: [PASS][15] -> [INCOMPLETE][16] ([fdo#107713] / [fdo#109100])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-dsi/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-dsi/igt@[email protected]

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: [PASS][17] -> [DMESG-WARN][18] ([fdo#105128] / [fdo#107139])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-icl-guc: [PASS][19] -> [INCOMPLETE][20] ([fdo#107713])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-guc/igt@i915_selftest@live_execlists.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-guc/igt@i915_selftest@live_execlists.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [PASS][21] -> [FAIL][22] ([fdo#103167])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-u2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_create@basic-files:
- fi-icl-u3: [INCOMPLETE][23] ([fdo#107713] / [fdo#109100]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-u3/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-bwr-2160: [DMESG-WARN][25] ([fdo#111115]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-bwr-2160/igt@i915_selftest@live_execlists.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-bwr-2160/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_hangcheck:
- fi-bwr-2160: [DMESG-FAIL][27] ([fdo#111115]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-bwr-2160/igt@i915_selftest@live_hangcheck.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-bwr-2160/igt@i915_selftest@live_hangcheck.html

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: [SKIP][29] ([fdo#109271] / [fdo#109278]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7567u/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7567u/igt@[email protected]

* igt@kms_busy@basic-flip-c:
- fi-kbl-7500u: [SKIP][31] ([fdo#109271] / [fdo#109278]) -> [PASS][32] +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- fi-kbl-7500u: [SKIP][33] ([fdo#109271]) -> [PASS][34] +23 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/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#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111046 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111046
[fdo#111115]: https://bugs.freedesktop.org/show_bug.cgi?id=111115

Participating hosts (54 -> 47)
------------------------------

Additional (2): fi-cfl-8109u fi-pnv-d510
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5107 -> IGTPW_3286

CI-20190529: 20190529
CI_DRM_6540: 23b909d90e1203a172548f7fc0328baea0e39648 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3286: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/
IGT_5107: 1a5b48671e0863cb723e3d0239e54c828360dc99 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

Re: [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: chatty connector status assertions

Quoted 42 lines · Patchwork

== Series Details ==

Series: tests/kms_chamelium: chatty connector status assertions
URL : https://patchwork.freedesktop.org/series/64087/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6540 -> IGTPW_3286
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_3286 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_3286, 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/64087/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_chamelium@dp-hpd-fast:
- fi-cml-u2: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-cml-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-cml-u2/igt@[email protected]
- fi-kbl-7500u: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@[email protected]

Quoted 7 lines

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [PASS][5] -> [FAIL][6] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@[email protected]
- fi-skl-6700k2: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-skl-6700k2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-skl-6700k2/igt@[email protected]

There are quitea a few bugs that are for "Failed assertion: finished", their filters need to be adjusted.

Few that I was able to find:

https://bugs.freedesktop.org/show_bug.cgi?id=109569
https://bugs.freedesktop.org/show_bug.cgi?id=111190
https://bugs.freedesktop.org/show_bug.cgi?id=111046
https://bugs.freedesktop.org/show_bug.cgi?id=111045

More verbose message may also lead to deduplicating some of those :-)

Signature · 6 lines
Cheers,
Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/1
#4 lore raw
In reply to Simon Ser
Quoted 89 lines · Simon Ser

This commit adds an error message to connector status assertions.

---

I'll update the CI filters.

 tests/kms_chamelium.c | 44 ++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)
tests/kms_chamelium.c +25 -10
index b7d30a2d0f55..0dc26e7274dc 100644
@@ -118,15 +118,25 @@ reprobe_connector(data_t *data, struct chamelium_port *port)
 	return status;
 }
 
+static const char *connection_str(drmModeConnection c)
+{
+	switch (c) {
+	case DRM_MODE_CONNECTED:
+		return "connected";
+	case DRM_MODE_DISCONNECTED:
+		return "disconnected";
+	case DRM_MODE_UNKNOWNCONNECTION:
+		return "unknown";
+	}
+	assert(0); /* unreachable */
+}
+
 static void
 wait_for_connector(data_t *data, struct chamelium_port *port,
 		   drmModeConnection status)
 {
-	bool finished = false;
-
-	igt_debug("Waiting for %s to %sconnect...\n",
-		  chamelium_port_get_name(port),
-		  status == DRM_MODE_DISCONNECTED ? "dis" : "");
+	igt_debug("Waiting for %s to get %s...\n",
+		  chamelium_port_get_name(port), connection_str(status));
 
 	/*
 	 * Rely on simple reprobing so we don't fail tests that don't require
@@ -134,14 +144,14 @@ wait_for_connector(data_t *data, struct chamelium_port *port,
 	 */
 	igt_until_timeout(HOTPLUG_TIMEOUT) {
 		if (reprobe_connector(data, port) == status) {
-			finished = true;
 			return;
 		}
 
 		usleep(50000);
 	}
 
-	igt_assert(finished);
+	igt_assert_f(false, "Timed out waiting for %s to get %s\n",
+		  chamelium_port_get_name(port), connection_str(status));
 }
 
 static int chamelium_vga_modes[][2] = {
@@ -234,6 +244,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
 {
 	struct udev_monitor *mon = igt_watch_hotplug();
 	int i;
+	drmModeConnection status;
 
 	reset_state(data, NULL);
 	igt_hpd_storm_set_threshold(data->drm_fd, 0);
@@ -243,17 +254,24 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
 
 		/* Check if we get a sysfs hotplug event */
 		chamelium_plug(data->chamelium, port);
-		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
-		igt_assert_eq(reprobe_connector(data, port),
-			      DRM_MODE_CONNECTED);
+		igt_assert_f(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT),
+			     "Timed out waiting for hotplug uevent\n");
+		status = reprobe_connector(data, port);
+		igt_assert_f(status == DRM_MODE_CONNECTED,
+			     "Invalid connector status after hotplug: "
+			     "got %s, expected connected\n",
+			     connection_str(status));
 
 		igt_flush_hotplugs(mon);
 
 		/* Now check if we get a hotplug from disconnection */
 		chamelium_unplug(data->chamelium, port);

tests/kms_chamelium.c test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count) · line 275

Quoted 10 lines
tests/kms_chamelium.c +6 -3
-		igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT));
-		igt_assert_eq(reprobe_connector(data, port),
-			      DRM_MODE_DISCONNECTED);
+		igt_assert_f(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT),
+			     "Timed out waiting for unplug uevent\n");
+		igt_assert_f(status == DRM_MODE_DISCONNECTED,
+			     "Invalid connector status after hotplug: "
+			     "got %s, expected disconnected\n",
+			     connection_str(status));
 	}

Seems like more asserts have changes. Please make sure that filters are created for the new ones before mergeing.

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev