public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions
@ 2019-07-23 13:54 Simon Ser
  2019-07-23 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Simon Ser @ 2019-07-23 13:54 UTC (permalink / raw)
  To: igt-dev

This commit adds an error message to connector status assertions.

Signed-off-by: Simon Ser <simon.ser@intel.com>
---

I'll update the CI filters.

 tests/kms_chamelium.c | 44 ++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index b7d30a2d0f55..0dc26e7274dc 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -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
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] ✗ GitLab.Pipeline: warning for tests/kms_chamelium: chatty connector status assertions
  2019-07-23 13:54 [igt-dev] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions Simon Ser
@ 2019-07-23 14:08 ` Patchwork
  2019-07-23 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
  2019-08-15 10:38 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-07-23 14:08 UTC (permalink / raw)
  To: Simon Ser; +Cc: igt-dev

== 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
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.BAT: failure for tests/kms_chamelium: chatty connector status assertions
  2019-07-23 13:54 [igt-dev] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions Simon Ser
  2019-07-23 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
@ 2019-07-23 14:36 ` Patchwork
  2019-08-15 10:36   ` Arkadiusz Hiler
  2019-08-15 10:38 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler
  2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2019-07-23 14:36 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev

== 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@kms_chamelium@dp-hpd-fast.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-cml-u2/igt@kms_chamelium@dp-hpd-fast.html
    - fi-kbl-7500u:       [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@kms_chamelium@dp-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@kms_chamelium@dp-hpd-fast.html

  * 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@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
    - fi-skl-6700k2:      [PASS][7] -> [FAIL][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-skl-6700k2/igt@kms_chamelium@hdmi-hpd-fast.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-skl-6700k2/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### 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@kms_chamelium@hdmi-hpd-fast.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
    - 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@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7567u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### 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@kms_chamelium@hdmi-crc-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u4/igt@kms_chamelium@hdmi-crc-fast.html

  
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@gem_ctx_create@basic-files.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-dsi/igt@gem_ctx_create@basic-files.html

  * 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@gem_exec_suspend@basic-s4-devices.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@gem_exec_suspend@basic-s4-devices.html

  * 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@kms_frontbuffer_tracking@basic.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  
#### 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@gem_ctx_create@basic-files.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u3/igt@gem_ctx_create@basic-files.html

  * 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@kms_busy@basic-flip-a.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7567u/igt@kms_busy@basic-flip-a.html

  * 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@kms_busy@basic-flip-c.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@kms_busy@basic-flip-c.html

  * 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@prime_vgem@basic-fence-flip.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@prime_vgem@basic-fence-flip.html

  
  {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
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] ✗ Fi.CI.BAT: failure  for tests/kms_chamelium: chatty connector status assertions
  2019-07-23 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
@ 2019-08-15 10:36   ` Arkadiusz Hiler
  0 siblings, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2019-08-15 10:36 UTC (permalink / raw)
  To: igt-dev

On Tue, Jul 23, 2019 at 02:36:49PM +0000, Patchwork wrote:
> == 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@kms_chamelium@dp-hpd-fast.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-cml-u2/igt@kms_chamelium@dp-hpd-fast.html
>     - fi-kbl-7500u:       [PASS][3] -> [FAIL][4]
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-kbl-7500u/igt@kms_chamelium@dp-hpd-fast.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-kbl-7500u/igt@kms_chamelium@dp-hpd-fast.html
> 
>   * 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@kms_chamelium@hdmi-hpd-fast.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
>     - fi-skl-6700k2:      [PASS][7] -> [FAIL][8]
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6540/fi-skl-6700k2/igt@kms_chamelium@hdmi-hpd-fast.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3286/fi-skl-6700k2/igt@kms_chamelium@hdmi-hpd-fast.html

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 :-)

-- 
Cheers,
Arek
_______________________________________________
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] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions
  2019-07-23 13:54 [igt-dev] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions Simon Ser
  2019-07-23 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
  2019-07-23 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
@ 2019-08-15 10:38 ` Arkadiusz Hiler
  2 siblings, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2019-08-15 10:38 UTC (permalink / raw)
  To: Simon Ser; +Cc: igt-dev

On Tue, Jul 23, 2019 at 04:54:05PM +0300, Simon Ser wrote:
> This commit adds an error message to connector status assertions.
> 
> Signed-off-by: Simon Ser <simon.ser@intel.com>
> ---
> 
> I'll update the CI filters.
> 
>  tests/kms_chamelium.c | 44 ++++++++++++++++++++++++++++++-------------
>  1 file changed, 31 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index b7d30a2d0f55..0dc26e7274dc 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -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));
>  	}

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

Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
_______________________________________________
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-08-15 10:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-23 13:54 [igt-dev] [PATCH i-g-t] tests/kms_chamelium: chatty connector status assertions Simon Ser
2019-07-23 14:08 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2019-07-23 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2019-08-15 10:36   ` Arkadiusz Hiler
2019-08-15 10:38 ` [igt-dev] [PATCH i-g-t] " Arkadiusz Hiler

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