public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure
@ 2023-02-02 18:01 Mark Yacoub
  2023-02-02 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Mark Yacoub @ 2023-02-02 18:01 UTC (permalink / raw)
  To: igt-dev; +Cc: amstan, ihf, seanpaul, markyacoub, khaled.almahallawy

From: Mark Yacoub <markyacoub@chromium.org>

[Why]
Currently, Chamelium acts like a black box, we can't tell what
is going on there when a failure occur. Seeing its logs will
allow us to debug better.

[How]
On chamelium_rpc failure, print out the logs in debug so it
wouldn't clutter good tests.

v2:
- Added missing #includes
v3:
- C-style comments (Kamil Konieczny)
- Cut commit messages to 65 char tops (Kamil Konieczny)

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 lib/igt_chamelium.c                    | 50 ++++++++++++++++++++++++--
 lib/igt_chamelium.h                    |  1 +
 tests/chamelium/kms_chamelium_helper.c | 18 ++++++++++
 3 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a235f3c8..bac6fb76 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -658,6 +658,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 	xmlrpc_value *res;
 	va_list va_args;
 	int fsm_trials_left = 5;
+	bool did_fault_occur = false;
+	char fault_string[1024];
 
 	if (strcmp(method_name, "CaptureVideo") == 0
 	    || strcmp(method_name, "StartCapturingVideo") == 0) {
@@ -680,9 +682,28 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 					 format_str, va_args);
 		va_end(va_args);
 	}
-	igt_assert_f(!chamelium->env.fault_occurred,
-		     "Chamelium RPC call[%s] failed: %s\n", method_name,
-		     chamelium->env.fault_string);
+
+	did_fault_occur = chamelium->env.fault_occurred;
+	if (did_fault_occur) {
+		/*
+		 * Save the fault string before getting the logs which will
+		 * clear the string if it is works.
+		 */
+		strncpy(fault_string, chamelium->env.fault_string, 1024);
+		/*
+		 * We call GetChameleondLogs on an xmlrpc failure. Let's not
+		 * call it when the xmlrpc failure is for GetChameleondLogs
+		 * itself as this can cause a recursive behavior.
+		 */
+		if (strcmp(method_name, "GetChameleondLogs") != 0) {
+			char *logs = chamelium_get_logs(chamelium);
+			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
+			free(logs);
+		}
+	}
+
+	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
+		     method_name, fault_string);
 
 	return res;
 }
@@ -737,6 +758,29 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
 		     "Couldn't connect to Chamelium for %ds", timeout);
 }
 
+/**
+ * chamelium_get_logs - Get the logs from the chamelium daemon
+ * @chamelium: The Chamelium instance to use
+ *
+ * Returns: The logs from the last time this was called.
+ */
+
+char *chamelium_get_logs(struct chamelium *chamelium)
+{
+	xmlrpc_value *res;
+	const char *logs = NULL;
+
+	igt_debug(
+		"Calling GetChameleondLogs - Logs returned are from the last time "
+		"this was called.\n");
+
+	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
+	xmlrpc_read_string(&chamelium->env, res, &logs);
+	xmlrpc_DECREF(res);
+
+	return logs;
+}
+
 /**
  * chamelium_plug:
  * @chamelium: The Chamelium instance to use
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index d979de4a..e9096519 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
 
 bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
 void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
+char *chamelium_get_logs(struct chamelium *chamelium);
 void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
 void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
 bool chamelium_is_plugged(struct chamelium *chamelium,
diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
index 197d29be..54f8ebfc 100644
--- a/tests/chamelium/kms_chamelium_helper.c
+++ b/tests/chamelium/kms_chamelium_helper.c
@@ -24,7 +24,19 @@
  *    Lyude Paul <lyude@redhat.com>
  */
 
+#include <fcntl.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdatomic.h>
+#include <xf86drmMode.h>
+
+#include "config.h"
+#include "igt.h"
+#include "igt_chamelium.h"
 #include "igt_edid.h"
+#include "igt_eld.h"
+#include "igt_vc4.h"
+#include "igt_infoframe.h"
 #include "kms_chamelium_helper.h"
 
 void chamelium_init_test(chamelium_data_t *data)
@@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
 	/* we need to initalize chamelium after igt_display_require */
 	data->chamelium = chamelium_init(data->drm_fd, &data->display);
 	igt_require(data->chamelium);
+	/*
+	 * Get the logs so we can reset the chamelium logs at this cursor.
+	 * The logs are then retrieved when any call fails so we can debug
+	 * chamelium if needed.
+	 */
+	free(chamelium_get_logs(data->chamelium));
 
 	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
 
-- 
2.39.1.519.gcb327c4b5f-goog

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

* [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
@ 2023-02-02 18:37 ` Patchwork
  2023-02-02 23:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-02 18:37 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12684 -> IGTPW_8437
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/index.html

Participating hosts (27 -> 25)
------------------------------

  Missing    (2): fi-kbl-soraka fi-snb-2520m 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium_frames@hdmi-crc-fast:
    - fi-kbl-7567u:       [PASS][1] -> [FAIL][2] ([i915#8005]) +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/fi-kbl-7567u/igt@kms_chamelium_frames@hdmi-crc-fast.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/fi-kbl-7567u/igt@kms_chamelium_frames@hdmi-crc-fast.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-dg1-6:          NOTRUN -> [SKIP][3] ([i915#7828])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/bat-dg1-6/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_lrc:
    - bat-dg1-6:          [ABORT][4] ([i915#4983]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/bat-dg1-6/igt@i915_selftest@live@gt_lrc.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/bat-dg1-6/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@reset:
    - {bat-rpls-2}:       [ABORT][6] ([i915#4983]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/bat-rpls-2/igt@i915_selftest@live@reset.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/bat-rpls-2/igt@i915_selftest@live@reset.html

  
#### Warnings ####

  * igt@kms_chamelium_hpd@vga-hpd-fast:
    - fi-kbl-7567u:       [SKIP][8] ([fdo#109271]) -> [FAIL][9] ([i915#8005]) +4 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/fi-kbl-7567u/igt@kms_chamelium_hpd@vga-hpd-fast.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/fi-kbl-7567u/igt@kms_chamelium_hpd@vga-hpd-fast.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
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#8005]: https://gitlab.freedesktop.org/drm/intel/issues/8005


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7144 -> IGTPW_8437

  CI-20190529: 20190529
  CI_DRM_12684: 57eb8680d3ef1213de1d9c607b95e522035036e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8437: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/index.html
  IGT_7144: cda71bf809b981a646270963d6b1ccee4fd4643b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Chamelium: Get Chamelium Logs on RPC failure
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
  2023-02-02 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-02-02 23:49 ` Patchwork
  2023-02-03  9:19 ` [igt-dev] [PATCH v3] " Kamil Konieczny
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-02 23:49 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12684_full -> IGTPW_8437_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/index.html

Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Suppressed ####

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

  * igt@gem_exec_capture@pi@vcs0:
    - {shard-tglu-9}:     [PASS][1] -> [ABORT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-tglu-9/igt@gem_exec_capture@pi@vcs0.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-tglu-9/igt@gem_exec_capture@pi@vcs0.html

  * igt@gem_exec_schedule@preempt-other@vecs0:
    - {shard-dg1}:        [PASS][3] -> [DMESG-WARN][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-dg1-16/igt@gem_exec_schedule@preempt-other@vecs0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-dg1-18/igt@gem_exec_schedule@preempt-other@vecs0.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([i915#2846])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-glk1/igt@gem_exec_fair@basic-deadline.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-glk1/igt@gem_exec_fair@basic-deadline.html

  * igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([i915#2346])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-glk2/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions.html

  * igt@kms_flip@plain-flip-ts-check@b-hdmi-a2:
    - shard-glk:          [PASS][9] -> [FAIL][10] ([i915#2122])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-glk5/igt@kms_flip@plain-flip-ts-check@b-hdmi-a2.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-glk7/igt@kms_flip@plain-flip-ts-check@b-hdmi-a2.html

  
#### Possible fixes ####

  * igt@fbdev@unaligned-read:
    - {shard-rkl}:        [SKIP][11] ([i915#2582]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-4/igt@fbdev@unaligned-read.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@fbdev@unaligned-read.html

  * igt@gem_ctx_isolation@preservation-s3@bcs0:
    - {shard-rkl}:        [DMESG-WARN][13] ([i915#5122]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-4/igt@gem_ctx_isolation@preservation-s3@bcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@gem_ctx_isolation@preservation-s3@bcs0.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
    - {shard-rkl}:        [ABORT][15] -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-4/igt@gem_ctx_isolation@preservation-s3@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@gem_ctx_persistence@many-contexts:
    - {shard-rkl}:        [INCOMPLETE][17] -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-3/igt@gem_ctx_persistence@many-contexts.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-4/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_eio@kms:
    - {shard-dg1}:        [FAIL][19] ([i915#5784]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-dg1-14/igt@gem_eio@kms.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-dg1-15/igt@gem_eio@kms.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-glk:          [FAIL][21] ([i915#2842]) -> [PASS][22] +3 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-glk4/igt@gem_exec_fair@basic-none-share@rcs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-glk8/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - {shard-rkl}:        [FAIL][23] ([i915#2842]) -> [PASS][24] +2 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-1/igt@gem_exec_fair@basic-none@vcs0.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_schedule@wide@rcs0:
    - shard-glk:          [FAIL][25] ([i915#6659]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-glk6/igt@gem_exec_schedule@wide@rcs0.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-glk8/igt@gem_exec_schedule@wide@rcs0.html

  * igt@gem_set_tiling_vs_blt@tiled-to-untiled:
    - {shard-rkl}:        [SKIP][27] ([i915#3281]) -> [PASS][28] +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-6/igt@gem_set_tiling_vs_blt@tiled-to-untiled.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@gem_set_tiling_vs_blt@tiled-to-untiled.html

  * igt@gem_tiled_partial_pwrite_pread@writes:
    - {shard-rkl}:        [SKIP][29] ([i915#3282]) -> [PASS][30] +3 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-1/igt@gem_tiled_partial_pwrite_pread@writes.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@gem_tiled_partial_pwrite_pread@writes.html

  * igt@gen9_exec_parse@secure-batches:
    - {shard-rkl}:        [SKIP][31] ([i915#2527]) -> [PASS][32] +2 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-6/igt@gen9_exec_parse@secure-batches.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@gen9_exec_parse@secure-batches.html

  * igt@i915_hangman@engine-engine-error@bcs0:
    - {shard-rkl}:        [SKIP][33] ([i915#6258]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-5/igt@i915_hangman@engine-engine-error@bcs0.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-2/igt@i915_hangman@engine-engine-error@bcs0.html

  * igt@i915_pipe_stress@stress-xrgb8888-ytiled:
    - {shard-rkl}:        [SKIP][35] ([i915#4098]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-3/igt@i915_pipe_stress@stress-xrgb8888-ytiled.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@i915_pipe_stress@stress-xrgb8888-ytiled.html

  * igt@i915_pm_rpm@fences-dpms:
    - {shard-rkl}:        [SKIP][37] ([i915#1849]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-1/igt@i915_pm_rpm@fences-dpms.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@i915_pm_rpm@fences-dpms.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - {shard-rkl}:        [SKIP][39] ([i915#1397]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-4/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@i915_pm_rpm@modeset-lpsp-stress.html
    - {shard-dg1}:        [SKIP][41] ([i915#1397]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-dg1-16/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-dg1-14/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@i915_pm_rpm@system-suspend-modeset:
    - {shard-rkl}:        [SKIP][43] ([fdo#109308]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-4/igt@i915_pm_rpm@system-suspend-modeset.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@i915_pm_rpm@system-suspend-modeset.html

  * igt@i915_suspend@debugfs-reader:
    - {shard-rkl}:        [FAIL][45] ([fdo#103375]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-3/igt@i915_suspend@debugfs-reader.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-2/igt@i915_suspend@debugfs-reader.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:
    - {shard-tglu}:       [SKIP][47] ([i915#1845] / [i915#7651]) -> [PASS][48] +2 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-tglu-6/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-tglu-2/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html

  * igt@kms_ccs@pipe-d-bad-pixel-format-y_tiled_gen12_rc_ccs:
    - {shard-tglu}:       [SKIP][49] ([i915#7651]) -> [PASS][50] +8 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-tglu-6/igt@kms_ccs@pipe-d-bad-pixel-format-y_tiled_gen12_rc_ccs.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-tglu-2/igt@kms_ccs@pipe-d-bad-pixel-format-y_tiled_gen12_rc_ccs.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite:
    - {shard-rkl}:        [SKIP][51] ([i915#1849] / [i915#4098]) -> [PASS][52] +8 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-3/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_psr@primary_blt:
    - {shard-rkl}:        [SKIP][53] ([i915#1072]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-1/igt@kms_psr@primary_blt.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@kms_psr@primary_blt.html

  * igt@kms_universal_plane@universal-plane-pipe-c-sanity:
    - {shard-tglu}:       [SKIP][55] ([fdo#109274]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-tglu-6/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-tglu-2/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html

  * igt@kms_vblank@pipe-b-query-idle:
    - {shard-rkl}:        [SKIP][57] ([i915#1845] / [i915#4098]) -> [PASS][58] +18 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-2/igt@kms_vblank@pipe-b-query-idle.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-6/igt@kms_vblank@pipe-b-query-idle.html

  * igt@perf@polling-small-buf:
    - {shard-rkl}:        [FAIL][59] ([i915#1722]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-1/igt@perf@polling-small-buf.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-5/igt@perf@polling-small-buf.html

  * igt@sysfs_timeslice_duration@timeout@rcs0:
    - {shard-rkl}:        [FAIL][61] ([i915#1755]) -> [PASS][62] +1 similar issue
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12684/shard-rkl-3/igt@sysfs_timeslice_duration@timeout@rcs0.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/shard-rkl-1/igt@sysfs_timeslice_duration@timeout@rcs0.html

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

  [IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
  [i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
  [i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
  [i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
  [i915#2436]: https://gitlab.freedesktop.org/drm/intel/issues/2436
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
  [i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
  [i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4854]: https://gitlab.freedesktop.org/drm/intel/issues/4854
  [i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
  [i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
  [i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
  [i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
  [i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6659]: https://gitlab.freedesktop.org/drm/intel/issues/6659
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
  [i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
  [i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
  [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7144 -> IGTPW_8437

  CI-20190529: 20190529
  CI_DRM_12684: 57eb8680d3ef1213de1d9c607b95e522035036e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8437: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8437/index.html
  IGT_7144: cda71bf809b981a646270963d6b1ccee4fd4643b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* Re: [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
  2023-02-02 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2023-02-02 23:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2023-02-03  9:19 ` Kamil Konieczny
  2023-02-03 10:12   ` Petri Latvala
  2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Kamil Konieczny @ 2023-02-03  9:19 UTC (permalink / raw)
  To: igt-dev; +Cc: amstan, ihf, seanpaul, markyacoub, khaled.almahallawy

On 2023-02-02 at 13:01:39 -0500, Mark Yacoub wrote:
> From: Mark Yacoub <markyacoub@chromium.org>
> 
> [Why]
> Currently, Chamelium acts like a black box, we can't tell what
> is going on there when a failure occur. Seeing its logs will
> allow us to debug better.
> 
> [How]
> On chamelium_rpc failure, print out the logs in debug so it
> wouldn't clutter good tests.
> 
> v2:
> - Added missing #includes
> v3:
> - C-style comments (Kamil Konieczny)
> - Cut commit messages to 65 char tops (Kamil Konieczny)
> 
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>

Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

> ---
>  lib/igt_chamelium.c                    | 50 ++++++++++++++++++++++++--
>  lib/igt_chamelium.h                    |  1 +
>  tests/chamelium/kms_chamelium_helper.c | 18 ++++++++++
>  3 files changed, 66 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index a235f3c8..bac6fb76 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -658,6 +658,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>  	xmlrpc_value *res;
>  	va_list va_args;
>  	int fsm_trials_left = 5;
> +	bool did_fault_occur = false;
> +	char fault_string[1024];
>  
>  	if (strcmp(method_name, "CaptureVideo") == 0
>  	    || strcmp(method_name, "StartCapturingVideo") == 0) {
> @@ -680,9 +682,28 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>  					 format_str, va_args);
>  		va_end(va_args);
>  	}
> -	igt_assert_f(!chamelium->env.fault_occurred,
> -		     "Chamelium RPC call[%s] failed: %s\n", method_name,
> -		     chamelium->env.fault_string);
> +
> +	did_fault_occur = chamelium->env.fault_occurred;
> +	if (did_fault_occur) {
> +		/*
> +		 * Save the fault string before getting the logs which will
> +		 * clear the string if it is works.
> +		 */
> +		strncpy(fault_string, chamelium->env.fault_string, 1024);
> +		/*
> +		 * We call GetChameleondLogs on an xmlrpc failure. Let's not
> +		 * call it when the xmlrpc failure is for GetChameleondLogs
> +		 * itself as this can cause a recursive behavior.
> +		 */
> +		if (strcmp(method_name, "GetChameleondLogs") != 0) {
> +			char *logs = chamelium_get_logs(chamelium);
> +			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> +			free(logs);
> +		}
> +	}
> +
> +	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> +		     method_name, fault_string);
>  
>  	return res;
>  }
> @@ -737,6 +758,29 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
>  		     "Couldn't connect to Chamelium for %ds", timeout);
>  }
>  
> +/**
> + * chamelium_get_logs - Get the logs from the chamelium daemon
> + * @chamelium: The Chamelium instance to use
> + *
> + * Returns: The logs from the last time this was called.
> + */
> +
> +char *chamelium_get_logs(struct chamelium *chamelium)
> +{
> +	xmlrpc_value *res;
> +	const char *logs = NULL;
> +
> +	igt_debug(
> +		"Calling GetChameleondLogs - Logs returned are from the last time "
> +		"this was called.\n");
> +
> +	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> +	xmlrpc_read_string(&chamelium->env, res, &logs);
> +	xmlrpc_DECREF(res);
> +
> +	return logs;
> +}
> +
>  /**
>   * chamelium_plug:
>   * @chamelium: The Chamelium instance to use
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index d979de4a..e9096519 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
>  
>  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
>  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> +char *chamelium_get_logs(struct chamelium *chamelium);
>  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
>  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
>  bool chamelium_is_plugged(struct chamelium *chamelium,
> diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> index 197d29be..54f8ebfc 100644
> --- a/tests/chamelium/kms_chamelium_helper.c
> +++ b/tests/chamelium/kms_chamelium_helper.c
> @@ -24,7 +24,19 @@
>   *    Lyude Paul <lyude@redhat.com>
>   */
>  
> +#include <fcntl.h>
> +#include <stdint.h>
> +#include <string.h>
> +#include <stdatomic.h>
> +#include <xf86drmMode.h>
> +
> +#include "config.h"
> +#include "igt.h"
> +#include "igt_chamelium.h"
>  #include "igt_edid.h"
> +#include "igt_eld.h"
> +#include "igt_vc4.h"
> +#include "igt_infoframe.h"
>  #include "kms_chamelium_helper.h"
>  
>  void chamelium_init_test(chamelium_data_t *data)
> @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
>  	/* we need to initalize chamelium after igt_display_require */
>  	data->chamelium = chamelium_init(data->drm_fd, &data->display);
>  	igt_require(data->chamelium);
> +	/*
> +	 * Get the logs so we can reset the chamelium logs at this cursor.
> +	 * The logs are then retrieved when any call fails so we can debug
> +	 * chamelium if needed.
> +	 */
> +	free(chamelium_get_logs(data->chamelium));
>  
>  	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
>  
> -- 
> 2.39.1.519.gcb327c4b5f-goog
> 

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

* Re: [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-03  9:19 ` [igt-dev] [PATCH v3] " Kamil Konieczny
@ 2023-02-03 10:12   ` Petri Latvala
  0 siblings, 0 replies; 18+ messages in thread
From: Petri Latvala @ 2023-02-03 10:12 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, Mark Yacoub, bhanuprakash.modem,
	khaled.almahallawy, seanpaul, markyacoub, ihf, amstan

On Fri, Feb 03, 2023 at 10:19:25AM +0100, Kamil Konieczny wrote:
> On 2023-02-02 at 13:01:39 -0500, Mark Yacoub wrote:
> > From: Mark Yacoub <markyacoub@chromium.org>
> > 
> > [Why]
> > Currently, Chamelium acts like a black box, we can't tell what
> > is going on there when a failure occur. Seeing its logs will
> > allow us to debug better.
> > 
> > [How]
> > On chamelium_rpc failure, print out the logs in debug so it
> > wouldn't clutter good tests.
> > 
> > v2:
> > - Added missing #includes
> > v3:
> > - C-style comments (Kamil Konieczny)
> > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > 
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> 
> Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

NAK from me, there's a very fatal error, see my reply in v1 thread.


-- 
Petri Latvala


> 
> > ---
> >  lib/igt_chamelium.c                    | 50 ++++++++++++++++++++++++--
> >  lib/igt_chamelium.h                    |  1 +
> >  tests/chamelium/kms_chamelium_helper.c | 18 ++++++++++
> >  3 files changed, 66 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > index a235f3c8..bac6fb76 100644
> > --- a/lib/igt_chamelium.c
> > +++ b/lib/igt_chamelium.c
> > @@ -658,6 +658,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >  	xmlrpc_value *res;
> >  	va_list va_args;
> >  	int fsm_trials_left = 5;
> > +	bool did_fault_occur = false;
> > +	char fault_string[1024];
> >  
> >  	if (strcmp(method_name, "CaptureVideo") == 0
> >  	    || strcmp(method_name, "StartCapturingVideo") == 0) {
> > @@ -680,9 +682,28 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >  					 format_str, va_args);
> >  		va_end(va_args);
> >  	}
> > -	igt_assert_f(!chamelium->env.fault_occurred,
> > -		     "Chamelium RPC call[%s] failed: %s\n", method_name,
> > -		     chamelium->env.fault_string);
> > +
> > +	did_fault_occur = chamelium->env.fault_occurred;
> > +	if (did_fault_occur) {
> > +		/*
> > +		 * Save the fault string before getting the logs which will
> > +		 * clear the string if it is works.
> > +		 */
> > +		strncpy(fault_string, chamelium->env.fault_string, 1024);
> > +		/*
> > +		 * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > +		 * call it when the xmlrpc failure is for GetChameleondLogs
> > +		 * itself as this can cause a recursive behavior.
> > +		 */
> > +		if (strcmp(method_name, "GetChameleondLogs") != 0) {
> > +			char *logs = chamelium_get_logs(chamelium);
> > +			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > +			free(logs);
> > +		}
> > +	}
> > +
> > +	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > +		     method_name, fault_string);
> >  
> >  	return res;
> >  }
> > @@ -737,6 +758,29 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> >  		     "Couldn't connect to Chamelium for %ds", timeout);
> >  }
> >  
> > +/**
> > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > + * @chamelium: The Chamelium instance to use
> > + *
> > + * Returns: The logs from the last time this was called.
> > + */
> > +
> > +char *chamelium_get_logs(struct chamelium *chamelium)
> > +{
> > +	xmlrpc_value *res;
> > +	const char *logs = NULL;
> > +
> > +	igt_debug(
> > +		"Calling GetChameleondLogs - Logs returned are from the last time "
> > +		"this was called.\n");
> > +
> > +	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > +	xmlrpc_read_string(&chamelium->env, res, &logs);
> > +	xmlrpc_DECREF(res);
> > +
> > +	return logs;
> > +}
> > +
> >  /**
> >   * chamelium_plug:
> >   * @chamelium: The Chamelium instance to use
> > diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> > index d979de4a..e9096519 100644
> > --- a/lib/igt_chamelium.h
> > +++ b/lib/igt_chamelium.h
> > @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
> >  
> >  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
> >  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> > +char *chamelium_get_logs(struct chamelium *chamelium);
> >  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
> >  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
> >  bool chamelium_is_plugged(struct chamelium *chamelium,
> > diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> > index 197d29be..54f8ebfc 100644
> > --- a/tests/chamelium/kms_chamelium_helper.c
> > +++ b/tests/chamelium/kms_chamelium_helper.c
> > @@ -24,7 +24,19 @@
> >   *    Lyude Paul <lyude@redhat.com>
> >   */
> >  
> > +#include <fcntl.h>
> > +#include <stdint.h>
> > +#include <string.h>
> > +#include <stdatomic.h>
> > +#include <xf86drmMode.h>
> > +
> > +#include "config.h"
> > +#include "igt.h"
> > +#include "igt_chamelium.h"
> >  #include "igt_edid.h"
> > +#include "igt_eld.h"
> > +#include "igt_vc4.h"
> > +#include "igt_infoframe.h"
> >  #include "kms_chamelium_helper.h"
> >  
> >  void chamelium_init_test(chamelium_data_t *data)
> > @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
> >  	/* we need to initalize chamelium after igt_display_require */
> >  	data->chamelium = chamelium_init(data->drm_fd, &data->display);
> >  	igt_require(data->chamelium);
> > +	/*
> > +	 * Get the logs so we can reset the chamelium logs at this cursor.
> > +	 * The logs are then retrieved when any call fails so we can debug
> > +	 * chamelium if needed.
> > +	 */
> > +	free(chamelium_get_logs(data->chamelium));
> >  
> >  	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
> >  
> > -- 
> > 2.39.1.519.gcb327c4b5f-goog
> > 

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

* [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
                   ` (2 preceding siblings ...)
  2023-02-03  9:19 ` [igt-dev] [PATCH v3] " Kamil Konieczny
@ 2023-02-03 16:57 ` Mark Yacoub
  2023-02-06 17:18   ` Kamil Konieczny
                     ` (2 more replies)
  2023-02-03 17:42 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev2) Patchwork
                   ` (3 subsequent siblings)
  7 siblings, 3 replies; 18+ messages in thread
From: Mark Yacoub @ 2023-02-03 16:57 UTC (permalink / raw)
  To: igt-dev; +Cc: amstan, ihf, seanpaul, markyacoub, khaled.almahallawy

From: Mark Yacoub <markyacoub@chromium.org>

[Why]
Currently, Chamelium acts like a black box, we can't tell what
is going on there when a failure occur. Seeing its logs will
allow us to debug better.

[How]
On chamelium_rpc failure, print out the logs in debug so it
wouldn't clutter good tests.

v2:
- Added missing #includes
v3:
- C-style comments (Kamil Konieczny)
- Cut commit messages to 65 char tops (Kamil Konieczny)
v4:
- Don't get the logs if it's not a cv3 (Petri)

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
 lib/igt_chamelium.h                    |  1 +
 tests/chamelium/kms_chamelium_helper.c | 18 +++++++
 3 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a235f3c8..5cdff70f 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -129,6 +129,8 @@ struct chamelium {
 	struct igt_list_head edids;
 	struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
 	int port_count;
+	// Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
+	bool is_cv3;
 };
 
 bool igt_chamelium_allow_fsm_handling = true;
@@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
 		usleep(50000);
 	}
 
+	/* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
+	igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
+
 	igt_assert_f(false, "Timed out waiting for %s to get %s\n",
 				 chamelium_port_get_name(port),
 				 kmstest_connector_status_str(status));
@@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 	xmlrpc_value *res;
 	va_list va_args;
 	int fsm_trials_left = 5;
+	bool did_fault_occur = false;
+	char fault_string[1024];
 
 	if (strcmp(method_name, "CaptureVideo") == 0
 	    || strcmp(method_name, "StartCapturingVideo") == 0) {
@@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 					 format_str, va_args);
 		va_end(va_args);
 	}
-	igt_assert_f(!chamelium->env.fault_occurred,
-		     "Chamelium RPC call[%s] failed: %s\n", method_name,
-		     chamelium->env.fault_string);
+
+	did_fault_occur = chamelium->env.fault_occurred;
+	if (did_fault_occur) {
+		/*
+		 * Save the fault string before getting the logs which will
+		 * clear the string if it is works.
+		 */
+		strncpy(fault_string, chamelium->env.fault_string, 1024);
+
+		if (strcmp(method_name, "GetChameleondLogs") == 0) {
+			did_fault_occur = false;
+			igt_debug("Failed to get chamelium logs: %s\n", fault_string);
+			igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
+			"been cleared for a while and the XMLRPC lib can't consume it all. "
+			"Regardless, we shouldn't fail on failing to get the logs.\n");
+		/*
+		 * We call GetChameleondLogs on an xmlrpc failure. Let's not
+		 * call it when the xmlrpc failure is for GetChameleondLogs
+		 * itself as this can cause a recursive behavior.
+		 */
+		} else {
+			char *logs = chamelium_get_logs(chamelium);
+			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
+			free(logs);
+		}
+	}
+
+	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
+		     method_name, fault_string);
 
 	return res;
 }
@@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
 		     "Couldn't connect to Chamelium for %ds", timeout);
 }
 
+/**
+ * chamelium_get_logs - Get the logs from the chamelium daemon
+ * @chamelium: The Chamelium instance to use
+ *
+ * Returns: The logs from the last time this was called.
+ */
+
+const char *chamelium_get_logs(struct chamelium *chamelium)
+{
+	xmlrpc_value *res;
+	const char *logs = NULL;
+
+	if (!chamelium->is_cv3) {
+		igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
+		return NULL;
+	}
+
+	igt_debug(
+		"Calling GetChameleondLogs - Logs returned are from the last time "
+		"this was called.\n");
+
+	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
+	xmlrpc_read_string(&chamelium->env, res, &logs);
+	xmlrpc_DECREF(res);
+
+	return logs;
+}
+
 /**
  * chamelium_plug:
  * @chamelium: The Chamelium instance to use
@@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
 {
 	struct chamelium *chamelium = chamelium_init_rpc_only();
 	bool mismatching_ports_found = false;
+	int port_ids[CHAMELIUM_MAX_PORTS];
 
 	if (chamelium == NULL)
 		return NULL;
@@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
 	 * the outputs to grab all supported connectors.*/
 	igt_display_reset_outputs(display);
 
+	if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
+		goto error;
+	// Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
+	chamelium->is_cv3 = port_ids[0] == 0;
+
 	return chamelium;
 error:
 	close(chamelium->drm_fd);
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index d979de4a..159c75ec 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
 
 bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
 void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
+const char *chamelium_get_logs(struct chamelium *chamelium);
 void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
 void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
 bool chamelium_is_plugged(struct chamelium *chamelium,
diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
index 197d29be..54f8ebfc 100644
--- a/tests/chamelium/kms_chamelium_helper.c
+++ b/tests/chamelium/kms_chamelium_helper.c
@@ -24,7 +24,19 @@
  *    Lyude Paul <lyude@redhat.com>
  */
 
+#include <fcntl.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdatomic.h>
+#include <xf86drmMode.h>
+
+#include "config.h"
+#include "igt.h"
+#include "igt_chamelium.h"
 #include "igt_edid.h"
+#include "igt_eld.h"
+#include "igt_vc4.h"
+#include "igt_infoframe.h"
 #include "kms_chamelium_helper.h"
 
 void chamelium_init_test(chamelium_data_t *data)
@@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
 	/* we need to initalize chamelium after igt_display_require */
 	data->chamelium = chamelium_init(data->drm_fd, &data->display);
 	igt_require(data->chamelium);
+	/*
+	 * Get the logs so we can reset the chamelium logs at this cursor.
+	 * The logs are then retrieved when any call fails so we can debug
+	 * chamelium if needed.
+	 */
+	free(chamelium_get_logs(data->chamelium));
 
 	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
 
-- 
2.39.1.519.gcb327c4b5f-goog

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

* [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev2)
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
                   ` (3 preceding siblings ...)
  2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
@ 2023-02-03 17:42 ` Patchwork
  2023-02-05  1:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-03 17:42 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure (rev2)
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12691 -> IGTPW_8447
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/index.html

Participating hosts (28 -> 25)
------------------------------

  Missing    (3): fi-kbl-soraka bat-atsm-1 fi-snb-2520m 

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-apl-guc:         [DMESG-FAIL][1] ([i915#5334]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@migrate:
    - {bat-adlp-9}:       [DMESG-FAIL][3] ([i915#7699]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/bat-adlp-9/igt@i915_selftest@live@migrate.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/bat-adlp-9/igt@i915_selftest@live@migrate.html

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

  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7148 -> IGTPW_8447

  CI-20190529: 20190529
  CI_DRM_12691: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8447: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/index.html
  IGT_7148: ee8e31cf39c44d3fdbd04d8db239f8a815f86121 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for Chamelium: Get Chamelium Logs on RPC failure (rev2)
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
                   ` (4 preceding siblings ...)
  2023-02-03 17:42 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev2) Patchwork
@ 2023-02-05  1:12 ` Patchwork
  2023-02-06 21:41 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev3) Patchwork
  2023-02-07  6:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-05  1:12 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure (rev2)
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12691_full -> IGTPW_8447_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/index.html

Participating hosts (9 -> 9)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-glk:          [PASS][1] -> [FAIL][2] ([i915#2842])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk5/igt@gem_exec_fair@basic-none@rcs0.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-glk2/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions:
    - shard-glk:          [PASS][3] -> [FAIL][4] ([i915#2346])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk9/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions.html

  
#### Possible fixes ####

  * igt@api_intel_bb@object-reloc-keep-cache:
    - {shard-rkl}:        [SKIP][5] ([i915#3281]) -> [PASS][6] +10 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-3/igt@api_intel_bb@object-reloc-keep-cache.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-5/igt@api_intel_bb@object-reloc-keep-cache.html

  * igt@drm_fdinfo@most-busy-idle-check-all@rcs0:
    - {shard-rkl}:        [FAIL][7] ([i915#7742]) -> [PASS][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-1/igt@drm_fdinfo@most-busy-idle-check-all@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-2/igt@drm_fdinfo@most-busy-idle-check-all@rcs0.html

  * igt@fbdev@unaligned-write:
    - {shard-rkl}:        [SKIP][9] ([i915#2582]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@fbdev@unaligned-write.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@fbdev@unaligned-write.html

  * igt@gem_ctx_persistence@hang:
    - {shard-rkl}:        [SKIP][11] ([i915#6252]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@gem_ctx_persistence@hang.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-1/igt@gem_ctx_persistence@hang.html

  * igt@gem_eio@suspend:
    - {shard-rkl}:        [FAIL][13] ([i915#5115] / [i915#7052]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@gem_eio@suspend.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-2/igt@gem_eio@suspend.html

  * igt@gem_exec_endless@dispatch@bcs0:
    - {shard-rkl}:        [SKIP][15] ([i915#6247]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@gem_exec_endless@dispatch@bcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-3/igt@gem_exec_endless@dispatch@bcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-glk:          [FAIL][17] ([i915#2842]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk7/igt@gem_exec_fair@basic-pace@rcs0.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-glk2/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_mmap_wc@set-cache-level:
    - {shard-rkl}:        [SKIP][19] ([i915#1850]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-1/igt@gem_mmap_wc@set-cache-level.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@gem_mmap_wc@set-cache-level.html

  * igt@gem_pread@bench:
    - {shard-rkl}:        [SKIP][21] ([i915#3282]) -> [PASS][22] +3 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@gem_pread@bench.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-5/igt@gem_pread@bench.html

  * igt@gen9_exec_parse@batch-invalid-length:
    - {shard-rkl}:        [SKIP][23] ([i915#2527]) -> [PASS][24] +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@gen9_exec_parse@batch-invalid-length.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-5/igt@gen9_exec_parse@batch-invalid-length.html

  * igt@i915_pm_dc@dc6-psr:
    - {shard-rkl}:        [SKIP][25] ([i915#658]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-3/igt@i915_pm_dc@dc6-psr.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_dc@dc9-dpms:
    - {shard-rkl}:        [SKIP][27] ([i915#3361]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@i915_pm_dc@dc9-dpms.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-4/igt@i915_pm_dc@dc9-dpms.html

  * igt@kms_atomic@atomic_plane_damage:
    - {shard-rkl}:        [SKIP][29] ([i915#4098]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-3/igt@kms_atomic@atomic_plane_damage.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@kms_atomic@atomic_plane_damage.html

  * igt@kms_big_fb@x-tiled-16bpp-rotate-180:
    - {shard-tglu}:       [SKIP][31] ([i915#1845] / [i915#7651]) -> [PASS][32] +4 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_big_fb@x-tiled-16bpp-rotate-180.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-tglu-7/igt@kms_big_fb@x-tiled-16bpp-rotate-180.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [FAIL][33] ([i915#79]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk7/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-glk4/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move:
    - {shard-tglu}:       [SKIP][35] ([i915#1849]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-tglu-1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html

  * igt@kms_frontbuffer_tracking@fbc-modesetfrombusy:
    - shard-glk:          [FAIL][37] -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk6/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-glk7/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite:
    - {shard-rkl}:        [SKIP][39] ([i915#1849] / [i915#4098]) -> [PASS][40] +15 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite.html

  * igt@kms_psr@cursor_plane_onoff:
    - {shard-rkl}:        [SKIP][41] ([i915#1072]) -> [PASS][42] +2 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@kms_psr@cursor_plane_onoff.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@kms_psr@cursor_plane_onoff.html

  * igt@kms_rotation_crc@primary-rotation-90:
    - {shard-rkl}:        [SKIP][43] ([i915#1845] / [i915#4098]) -> [PASS][44] +18 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@kms_rotation_crc@primary-rotation-90.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-rkl-6/igt@kms_rotation_crc@primary-rotation-90.html

  * igt@kms_vblank@pipe-c-ts-continuation-idle-hang:
    - {shard-tglu}:       [SKIP][45] ([i915#7651]) -> [PASS][46] +7 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_vblank@pipe-c-ts-continuation-idle-hang.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/shard-tglu-7/igt@kms_vblank@pipe-c-ts-continuation-idle-hang.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
  [i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
  [i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
  [i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
  [i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
  [i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7148 -> IGTPW_8447

  CI-20190529: 20190529
  CI_DRM_12691: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8447: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8447/index.html
  IGT_7148: ee8e31cf39c44d3fdbd04d8db239f8a815f86121 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
@ 2023-02-06 17:18   ` Kamil Konieczny
  2023-02-06 18:01     ` Alexandru M Stan
  2023-02-06 20:41     ` Mark Yacoub
  2023-02-06 18:16   ` Alexandru M Stan
  2023-02-06 20:38   ` Mark Yacoub
  2 siblings, 2 replies; 18+ messages in thread
From: Kamil Konieczny @ 2023-02-06 17:18 UTC (permalink / raw)
  To: igt-dev; +Cc: amstan, ihf, seanpaul, markyacoub, khaled.almahallawy

Hi Mark,

On 2023-02-03 at 11:57:48 -0500, Mark Yacoub wrote:
> From: Mark Yacoub <markyacoub@chromium.org>
> 
> [Why]
> Currently, Chamelium acts like a black box, we can't tell what
> is going on there when a failure occur. Seeing its logs will
> allow us to debug better.
> 
> [How]
> On chamelium_rpc failure, print out the logs in debug so it
> wouldn't clutter good tests.
> 
> v2:
> - Added missing #includes
> v3:
> - C-style comments (Kamil Konieczny)
> - Cut commit messages to 65 char tops (Kamil Konieczny)
> v4:
> - Don't get the logs if it's not a cv3 (Petri)
> 
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> ---
>  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
>  lib/igt_chamelium.h                    |  1 +
>  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
>  3 files changed, 89 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index a235f3c8..5cdff70f 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -129,6 +129,8 @@ struct chamelium {
>  	struct igt_list_head edids;
>  	struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
>  	int port_count;
> +	// Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> +	bool is_cv3;
>  };
>  
>  bool igt_chamelium_allow_fsm_handling = true;
> @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
>  		usleep(50000);
>  	}
>  
> +	/* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> +	igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> +
>  	igt_assert_f(false, "Timed out waiting for %s to get %s\n",
>  				 chamelium_port_get_name(port),
>  				 kmstest_connector_status_str(status));
> @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>  	xmlrpc_value *res;
>  	va_list va_args;
>  	int fsm_trials_left = 5;
> +	bool did_fault_occur = false;
> +	char fault_string[1024];
>  
>  	if (strcmp(method_name, "CaptureVideo") == 0
>  	    || strcmp(method_name, "StartCapturingVideo") == 0) {
> @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>  					 format_str, va_args);
>  		va_end(va_args);
>  	}
> -	igt_assert_f(!chamelium->env.fault_occurred,
> -		     "Chamelium RPC call[%s] failed: %s\n", method_name,
> -		     chamelium->env.fault_string);
> +
> +	did_fault_occur = chamelium->env.fault_occurred;
> +	if (did_fault_occur) {
> +		/*
> +		 * Save the fault string before getting the logs which will
> +		 * clear the string if it is works.
> +		 */
> +		strncpy(fault_string, chamelium->env.fault_string, 1024);
> +
> +		if (strcmp(method_name, "GetChameleondLogs") == 0) {
> +			did_fault_occur = false;
> +			igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> +			igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> +			"been cleared for a while and the XMLRPC lib can't consume it all. "
> +			"Regardless, we shouldn't fail on failing to get the logs.\n");
> +		/*
> +		 * We call GetChameleondLogs on an xmlrpc failure. Let's not
> +		 * call it when the xmlrpc failure is for GetChameleondLogs
> +		 * itself as this can cause a recursive behavior.
> +		 */

This comment should be after if (strcmp...), please also align it.

> +		} else {
> +			char *logs = chamelium_get_logs(chamelium);
> +			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> +			free(logs);
> +		}
> +	}
> +
> +	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> +		     method_name, fault_string);
>  
>  	return res;
>  }
> @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
>  		     "Couldn't connect to Chamelium for %ds", timeout);
>  }
>  
> +/**
> + * chamelium_get_logs - Get the logs from the chamelium daemon
> + * @chamelium: The Chamelium instance to use
> + *
> + * Returns: The logs from the last time this was called.
> + */
> +
> +const char *chamelium_get_logs(struct chamelium *chamelium)
> +{
> +	xmlrpc_value *res;
> +	const char *logs = NULL;
> +
> +	if (!chamelium->is_cv3) {
> +		igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> +		return NULL;
> +	}
> +
> +	igt_debug(
> +		"Calling GetChameleondLogs - Logs returned are from the last time "

Please move this to above line, so
	igt_debug("Your message ..."
		  " continued\n");


> +		"this was called.\n");
> +
> +	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> +	xmlrpc_read_string(&chamelium->env, res, &logs);
> +	xmlrpc_DECREF(res);
> +
> +	return logs;
> +}
> +
>  /**
>   * chamelium_plug:
>   * @chamelium: The Chamelium instance to use
> @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
>  {
>  	struct chamelium *chamelium = chamelium_init_rpc_only();
>  	bool mismatching_ports_found = false;
> +	int port_ids[CHAMELIUM_MAX_PORTS];
>  
>  	if (chamelium == NULL)
>  		return NULL;
> @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
>  	 * the outputs to grab all supported connectors.*/
>  	igt_display_reset_outputs(display);
>  
> +	if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> +		goto error;
> +	// Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
------- ^
Please use C-style comment /* Your comment here */.

> +	chamelium->is_cv3 = port_ids[0] == 0;

How is start number of video port related to rpc daemon ?

Regards,
Kamil

> +
>  	return chamelium;
>  error:
>  	close(chamelium->drm_fd);
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index d979de4a..159c75ec 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
>  
>  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
>  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> +const char *chamelium_get_logs(struct chamelium *chamelium);
>  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
>  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
>  bool chamelium_is_plugged(struct chamelium *chamelium,
> diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> index 197d29be..54f8ebfc 100644
> --- a/tests/chamelium/kms_chamelium_helper.c
> +++ b/tests/chamelium/kms_chamelium_helper.c
> @@ -24,7 +24,19 @@
>   *    Lyude Paul <lyude@redhat.com>
>   */
>  
> +#include <fcntl.h>
> +#include <stdint.h>
> +#include <string.h>
> +#include <stdatomic.h>
> +#include <xf86drmMode.h>
> +
> +#include "config.h"
> +#include "igt.h"
> +#include "igt_chamelium.h"
>  #include "igt_edid.h"
> +#include "igt_eld.h"
> +#include "igt_vc4.h"
> +#include "igt_infoframe.h"
>  #include "kms_chamelium_helper.h"
>  
>  void chamelium_init_test(chamelium_data_t *data)
> @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
>  	/* we need to initalize chamelium after igt_display_require */
>  	data->chamelium = chamelium_init(data->drm_fd, &data->display);
>  	igt_require(data->chamelium);
> +	/*
> +	 * Get the logs so we can reset the chamelium logs at this cursor.
> +	 * The logs are then retrieved when any call fails so we can debug
> +	 * chamelium if needed.
> +	 */
> +	free(chamelium_get_logs(data->chamelium));
>  
>  	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
>  
> -- 
> 2.39.1.519.gcb327c4b5f-goog
> 

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-06 17:18   ` Kamil Konieczny
@ 2023-02-06 18:01     ` Alexandru M Stan
  2023-02-06 20:41     ` Mark Yacoub
  1 sibling, 0 replies; 18+ messages in thread
From: Alexandru M Stan @ 2023-02-06 18:01 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, Mark Yacoub, adrinael,
	bhanuprakash.modem, khaled.almahallawy, seanpaul, markyacoub, ihf,
	amstan

On Mon, Feb 6, 2023 at 9:18 AM Kamil Konieczny
<kamil.konieczny@linux.intel.com> wrote:
>
> Hi Mark,
>
> On 2023-02-03 at 11:57:48 -0500, Mark Yacoub wrote:
> > From: Mark Yacoub <markyacoub@chromium.org>
> >
> > [Why]
> > Currently, Chamelium acts like a black box, we can't tell what
> > is going on there when a failure occur. Seeing its logs will
> > allow us to debug better.
> >
> > [How]
> > On chamelium_rpc failure, print out the logs in debug so it
> > wouldn't clutter good tests.
> >
> > v2:
> > - Added missing #includes
> > v3:
> > - C-style comments (Kamil Konieczny)
> > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > v4:
> > - Don't get the logs if it's not a cv3 (Petri)
> >
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > ---
> >  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
> >  lib/igt_chamelium.h                    |  1 +
> >  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
> >  3 files changed, 89 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > index a235f3c8..5cdff70f 100644
> > --- a/lib/igt_chamelium.c
> > +++ b/lib/igt_chamelium.c
> > @@ -129,6 +129,8 @@ struct chamelium {
> >       struct igt_list_head edids;
> >       struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
> >       int port_count;
> > +     // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> > +     bool is_cv3;
> >  };
> >
> >  bool igt_chamelium_allow_fsm_handling = true;
> > @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
> >               usleep(50000);
> >       }
> >
> > +     /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> > +     igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> > +
> >       igt_assert_f(false, "Timed out waiting for %s to get %s\n",
> >                                chamelium_port_get_name(port),
> >                                kmstest_connector_status_str(status));
> > @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >       xmlrpc_value *res;
> >       va_list va_args;
> >       int fsm_trials_left = 5;
> > +     bool did_fault_occur = false;
> > +     char fault_string[1024];
> >
> >       if (strcmp(method_name, "CaptureVideo") == 0
> >           || strcmp(method_name, "StartCapturingVideo") == 0) {
> > @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >                                        format_str, va_args);
> >               va_end(va_args);
> >       }
> > -     igt_assert_f(!chamelium->env.fault_occurred,
> > -                  "Chamelium RPC call[%s] failed: %s\n", method_name,
> > -                  chamelium->env.fault_string);
> > +
> > +     did_fault_occur = chamelium->env.fault_occurred;
> > +     if (did_fault_occur) {
> > +             /*
> > +              * Save the fault string before getting the logs which will
> > +              * clear the string if it is works.
> > +              */
> > +             strncpy(fault_string, chamelium->env.fault_string, 1024);
> > +
> > +             if (strcmp(method_name, "GetChameleondLogs") == 0) {
> > +                     did_fault_occur = false;
> > +                     igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> > +                     igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> > +                     "been cleared for a while and the XMLRPC lib can't consume it all. "
> > +                     "Regardless, we shouldn't fail on failing to get the logs.\n");
> > +             /*
> > +              * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > +              * call it when the xmlrpc failure is for GetChameleondLogs
> > +              * itself as this can cause a recursive behavior.
> > +              */
>
> This comment should be after if (strcmp...), please also align it.
>
> > +             } else {
> > +                     char *logs = chamelium_get_logs(chamelium);
> > +                     igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > +                     free(logs);
> > +             }
> > +     }
> > +
> > +     igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > +                  method_name, fault_string);
> >
> >       return res;
> >  }
> > @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> >                    "Couldn't connect to Chamelium for %ds", timeout);
> >  }
> >
> > +/**
> > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > + * @chamelium: The Chamelium instance to use
> > + *
> > + * Returns: The logs from the last time this was called.
> > + */
> > +
> > +const char *chamelium_get_logs(struct chamelium *chamelium)
> > +{
> > +     xmlrpc_value *res;
> > +     const char *logs = NULL;
> > +
> > +     if (!chamelium->is_cv3) {
> > +             igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> > +             return NULL;
> > +     }
> > +
> > +     igt_debug(
> > +             "Calling GetChameleondLogs - Logs returned are from the last time "
>
> Please move this to above line, so
>         igt_debug("Your message ..."
>                   " continued\n");
>
>
> > +             "this was called.\n");
> > +
> > +     res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > +     xmlrpc_read_string(&chamelium->env, res, &logs);
> > +     xmlrpc_DECREF(res);
> > +
> > +     return logs;
> > +}
> > +
> >  /**
> >   * chamelium_plug:
> >   * @chamelium: The Chamelium instance to use
> > @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >  {
> >       struct chamelium *chamelium = chamelium_init_rpc_only();
> >       bool mismatching_ports_found = false;
> > +     int port_ids[CHAMELIUM_MAX_PORTS];
> >
> >       if (chamelium == NULL)
> >               return NULL;
> > @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >        * the outputs to grab all supported connectors.*/
> >       igt_display_reset_outputs(display);
> >
> > +     if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> > +             goto error;
> > +     // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
> ------- ^
> Please use C-style comment /* Your comment here */.
>
> > +     chamelium->is_cv3 = port_ids[0] == 0;
>
> How is start number of video port related to rpc daemon ?

On v3 the ports in chameleond start at 0. Mark's trying to use that
implementation detail as a heuristic to know which chameleon version
it is. I do not like it, see my other reply.

Alexandru Stan (amstan)

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
  2023-02-06 17:18   ` Kamil Konieczny
@ 2023-02-06 18:16   ` Alexandru M Stan
  2023-02-06 20:46     ` Mark Yacoub
  2023-02-06 20:38   ` Mark Yacoub
  2 siblings, 1 reply; 18+ messages in thread
From: Alexandru M Stan @ 2023-02-06 18:16 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: ihf, igt-dev, seanpaul, markyacoub, khaled.almahallawy

On Fri, Feb 3, 2023 at 8:57 AM Mark Yacoub <markyacoub@chromium.org> wrote:
>
> From: Mark Yacoub <markyacoub@chromium.org>
>
> [Why]
> Currently, Chamelium acts like a black box, we can't tell what
> is going on there when a failure occur. Seeing its logs will
> allow us to debug better.
>
> [How]
> On chamelium_rpc failure, print out the logs in debug so it
> wouldn't clutter good tests.
>
> v2:
> - Added missing #includes
> v3:
> - C-style comments (Kamil Konieczny)
> - Cut commit messages to 65 char tops (Kamil Konieczny)
> v4:
> - Don't get the logs if it's not a cv3 (Petri)
No, logs getting should have nothing to do if it's a cv3 or not.

There's no reason why cv2 can't get this API too.

>
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> ---
>  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
>  lib/igt_chamelium.h                    |  1 +
>  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
>  3 files changed, 89 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index a235f3c8..5cdff70f 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -129,6 +129,8 @@ struct chamelium {
>         struct igt_list_head edids;
>         struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
>         int port_count;
> +       // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> +       bool is_cv3;
>  };
>
>  bool igt_chamelium_allow_fsm_handling = true;
> @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
>                 usleep(50000);
>         }
>
> +       /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> +       igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> +
>         igt_assert_f(false, "Timed out waiting for %s to get %s\n",
>                                  chamelium_port_get_name(port),
>                                  kmstest_connector_status_str(status));
> @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>         xmlrpc_value *res;
>         va_list va_args;
>         int fsm_trials_left = 5;
> +       bool did_fault_occur = false;
> +       char fault_string[1024];
>
>         if (strcmp(method_name, "CaptureVideo") == 0
>             || strcmp(method_name, "StartCapturingVideo") == 0) {
> @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
>                                          format_str, va_args);
>                 va_end(va_args);
>         }
> -       igt_assert_f(!chamelium->env.fault_occurred,
> -                    "Chamelium RPC call[%s] failed: %s\n", method_name,
> -                    chamelium->env.fault_string);
> +
> +       did_fault_occur = chamelium->env.fault_occurred;
> +       if (did_fault_occur) {
Please gather logs for every test invocation regardless of if
fault_occured. I have seen some recent tests happily claiming that
things passed ;) but that was not the case. It's still useful to have
logs for debugging when that happens. It's also useful to see what a
normal invocation of the test looks like.

> +               /*
> +                * Save the fault string before getting the logs which will
> +                * clear the string if it is works.
> +                */
> +               strncpy(fault_string, chamelium->env.fault_string, 1024);
> +
> +               if (strcmp(method_name, "GetChameleondLogs") == 0) {
> +                       did_fault_occur = false;
> +                       igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> +                       igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> +                       "been cleared for a while and the XMLRPC lib can't consume it all. "
> +                       "Regardless, we shouldn't fail on failing to get the logs.\n");
> +               /*
> +                * We call GetChameleondLogs on an xmlrpc failure. Let's not
> +                * call it when the xmlrpc failure is for GetChameleondLogs
> +                * itself as this can cause a recursive behavior.
> +                */
> +               } else {
> +                       char *logs = chamelium_get_logs(chamelium);
> +                       igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> +                       free(logs);
> +               }
> +       }
> +
> +       igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> +                    method_name, fault_string);
>
>         return res;
>  }
> @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
>                      "Couldn't connect to Chamelium for %ds", timeout);
>  }
>
> +/**
> + * chamelium_get_logs - Get the logs from the chamelium daemon
> + * @chamelium: The Chamelium instance to use
> + *
> + * Returns: The logs from the last time this was called.
> + */
> +
> +const char *chamelium_get_logs(struct chamelium *chamelium)
> +{
> +       xmlrpc_value *res;
> +       const char *logs = NULL;
> +
> +       if (!chamelium->is_cv3) {
Please just call GetChameleondLogs all the time, if you get the
obvious NotImplementedError, you just return, recording the error
somewhere.

> +               igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> +               return NULL;
> +       }
> +
> +       igt_debug(
> +               "Calling GetChameleondLogs - Logs returned are from the last time "
> +               "this was called.\n");
> +
> +       res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> +       xmlrpc_read_string(&chamelium->env, res, &logs);
> +       xmlrpc_DECREF(res);
> +
> +       return logs;
> +}
> +
>  /**
>   * chamelium_plug:
>   * @chamelium: The Chamelium instance to use
> @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
>  {
>         struct chamelium *chamelium = chamelium_init_rpc_only();
>         bool mismatching_ports_found = false;
> +       int port_ids[CHAMELIUM_MAX_PORTS];
>
>         if (chamelium == NULL)
>                 return NULL;
> @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
>          * the outputs to grab all supported connectors.*/
>         igt_display_reset_outputs(display);
>
> +       if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> +               goto error;
> +       // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
Please don't, there should be absolutely no reason that you need to
keep track of this, and even if you did, some random implementation
difference is not the proper way to do this.

Prefer feature detection. Same spirit as
https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent

> +       chamelium->is_cv3 = port_ids[0] == 0;
> +
>         return chamelium;
>  error:
>         close(chamelium->drm_fd);
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index d979de4a..159c75ec 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
>
>  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
>  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> +const char *chamelium_get_logs(struct chamelium *chamelium);
>  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
>  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
>  bool chamelium_is_plugged(struct chamelium *chamelium,
> diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> index 197d29be..54f8ebfc 100644
> --- a/tests/chamelium/kms_chamelium_helper.c
> +++ b/tests/chamelium/kms_chamelium_helper.c
> @@ -24,7 +24,19 @@
>   *    Lyude Paul <lyude@redhat.com>
>   */
>
> +#include <fcntl.h>
> +#include <stdint.h>
> +#include <string.h>
> +#include <stdatomic.h>
> +#include <xf86drmMode.h>
> +
> +#include "config.h"
> +#include "igt.h"
> +#include "igt_chamelium.h"
>  #include "igt_edid.h"
> +#include "igt_eld.h"
> +#include "igt_vc4.h"
> +#include "igt_infoframe.h"
>  #include "kms_chamelium_helper.h"
>
>  void chamelium_init_test(chamelium_data_t *data)
> @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
>         /* we need to initalize chamelium after igt_display_require */
>         data->chamelium = chamelium_init(data->drm_fd, &data->display);
>         igt_require(data->chamelium);
> +       /*
> +        * Get the logs so we can reset the chamelium logs at this cursor.
> +        * The logs are then retrieved when any call fails so we can debug
> +        * chamelium if needed.
> +        */
> +       free(chamelium_get_logs(data->chamelium));
>
>         data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
>
> --
> 2.39.1.519.gcb327c4b5f-goog
>

NAK from me (chameleond author for v3), needs more polishing and doing
things the right way.

Alexandru Stan (amstan)

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

* [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
  2023-02-06 17:18   ` Kamil Konieczny
  2023-02-06 18:16   ` Alexandru M Stan
@ 2023-02-06 20:38   ` Mark Yacoub
  2 siblings, 0 replies; 18+ messages in thread
From: Mark Yacoub @ 2023-02-06 20:38 UTC (permalink / raw)
  To: igt-dev; +Cc: ihf, seanpaul, markyacoub, khaled.almahallawy

From: Mark Yacoub <markyacoub@chromium.org>

[Why]
Currently, Chamelium acts like a black box, we can't tell what
is going on there when a failure occur. Seeing its logs will
allow us to debug better.

[How]
On chamelium_rpc failure, print out the logs in debug so it
wouldn't clutter good tests.

v2:
- Added missing #includes
v3:
- C-style comments (Kamil Konieczny)
- Cut commit messages to 65 char tops (Kamil Konieczny)
v4:
- Don't get the logs if it's not a cv3 (Petri)
v5:
- Fix comments style (Kamil)

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
 lib/igt_chamelium.h                    |  1 +
 tests/chamelium/kms_chamelium_helper.c | 18 +++++++
 3 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a235f3c8..f6df2098 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -129,6 +129,9 @@ struct chamelium {
 	struct igt_list_head edids;
 	struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
 	int port_count;
+	/* Chamelium V3 requires some work arounds and has some extra
+	   functionalities. This keeps things safe. */
+	bool is_cv3;
 };
 
 bool igt_chamelium_allow_fsm_handling = true;
@@ -447,6 +450,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
 		usleep(50000);
 	}
 
+	/* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
+	igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
+
 	igt_assert_f(false, "Timed out waiting for %s to get %s\n",
 				 chamelium_port_get_name(port),
 				 kmstest_connector_status_str(status));
@@ -658,6 +664,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 	xmlrpc_value *res;
 	va_list va_args;
 	int fsm_trials_left = 5;
+	bool did_fault_occur = false;
+	char fault_string[1024];
 
 	if (strcmp(method_name, "CaptureVideo") == 0
 	    || strcmp(method_name, "StartCapturingVideo") == 0) {
@@ -680,9 +688,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
 					 format_str, va_args);
 		va_end(va_args);
 	}
-	igt_assert_f(!chamelium->env.fault_occurred,
-		     "Chamelium RPC call[%s] failed: %s\n", method_name,
-		     chamelium->env.fault_string);
+
+	did_fault_occur = chamelium->env.fault_occurred;
+	if (did_fault_occur) {
+		/*
+		 * Save the fault string before getting the logs which will
+		 * clear the string if it is works.
+		 */
+		strncpy(fault_string, chamelium->env.fault_string, 1024);
+
+		if (strcmp(method_name, "GetChameleondLogs") == 0) {
+			did_fault_occur = false;
+			igt_debug("Failed to get chamelium logs: %s\n", fault_string);
+			igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
+			"been cleared for a while and the XMLRPC lib can't consume it all. "
+			"Regardless, we shouldn't fail on failing to get the logs.\n");
+			/*
+			 * We call GetChameleondLogs on an xmlrpc failure. Let's not
+			 * call it when the xmlrpc failure is for GetChameleondLogs
+			 * itself as this can cause a recursive behavior.
+			 */
+		} else {
+			char *logs = chamelium_get_logs(chamelium);
+			igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
+			free(logs);
+		}
+	}
+
+	igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
+		     method_name, fault_string);
 
 	return res;
 }
@@ -737,6 +771,33 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
 		     "Couldn't connect to Chamelium for %ds", timeout);
 }
 
+/**
+ * chamelium_get_logs - Get the logs from the chamelium daemon
+ * @chamelium: The Chamelium instance to use
+ *
+ * Returns: The logs from the last time this was called.
+ */
+
+const char *chamelium_get_logs(struct chamelium *chamelium)
+{
+	xmlrpc_value *res;
+	const char *logs = NULL;
+
+	if (!chamelium->is_cv3) {
+		igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
+		return NULL;
+	}
+
+	igt_debug("Calling GetChameleondLogs - Logs returned are from the last "
+		  "time this was called.\n");
+
+	res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
+	xmlrpc_read_string(&chamelium->env, res, &logs);
+	xmlrpc_DECREF(res);
+
+	return logs;
+}
+
 /**
  * chamelium_plug:
  * @chamelium: The Chamelium instance to use
@@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
 {
 	struct chamelium *chamelium = chamelium_init_rpc_only();
 	bool mismatching_ports_found = false;
+	int port_ids[CHAMELIUM_MAX_PORTS];
 
 	if (chamelium == NULL)
 		return NULL;
@@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
 	 * the outputs to grab all supported connectors.*/
 	igt_display_reset_outputs(display);
 
+	if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
+		goto error;
+	/* Chamelium V3 port IDs start with 0, while V2 port IDs start with 1. */
+	chamelium->is_cv3 = port_ids[0] == 0;
+
 	return chamelium;
 error:
 	close(chamelium->drm_fd);
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index d979de4a..159c75ec 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
 
 bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
 void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
+const char *chamelium_get_logs(struct chamelium *chamelium);
 void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
 void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
 bool chamelium_is_plugged(struct chamelium *chamelium,
diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
index 197d29be..54f8ebfc 100644
--- a/tests/chamelium/kms_chamelium_helper.c
+++ b/tests/chamelium/kms_chamelium_helper.c
@@ -24,7 +24,19 @@
  *    Lyude Paul <lyude@redhat.com>
  */
 
+#include <fcntl.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdatomic.h>
+#include <xf86drmMode.h>
+
+#include "config.h"
+#include "igt.h"
+#include "igt_chamelium.h"
 #include "igt_edid.h"
+#include "igt_eld.h"
+#include "igt_vc4.h"
+#include "igt_infoframe.h"
 #include "kms_chamelium_helper.h"
 
 void chamelium_init_test(chamelium_data_t *data)
@@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
 	/* we need to initalize chamelium after igt_display_require */
 	data->chamelium = chamelium_init(data->drm_fd, &data->display);
 	igt_require(data->chamelium);
+	/*
+	 * Get the logs so we can reset the chamelium logs at this cursor.
+	 * The logs are then retrieved when any call fails so we can debug
+	 * chamelium if needed.
+	 */
+	free(chamelium_get_logs(data->chamelium));
 
 	data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
 
-- 
2.39.1.519.gcb327c4b5f-goog

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-06 17:18   ` Kamil Konieczny
  2023-02-06 18:01     ` Alexandru M Stan
@ 2023-02-06 20:41     ` Mark Yacoub
  1 sibling, 0 replies; 18+ messages in thread
From: Mark Yacoub @ 2023-02-06 20:41 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, Mark Yacoub, adrinael,
	bhanuprakash.modem, khaled.almahallawy, seanpaul, markyacoub, ihf,
	amstan

On Mon, Feb 6, 2023 at 12:18 PM Kamil Konieczny
<kamil.konieczny@linux.intel.com> wrote:
>
> Hi Mark,
>
> On 2023-02-03 at 11:57:48 -0500, Mark Yacoub wrote:
> > From: Mark Yacoub <markyacoub@chromium.org>
> >
> > [Why]
> > Currently, Chamelium acts like a black box, we can't tell what
> > is going on there when a failure occur. Seeing its logs will
> > allow us to debug better.
> >
> > [How]
> > On chamelium_rpc failure, print out the logs in debug so it
> > wouldn't clutter good tests.
> >
> > v2:
> > - Added missing #includes
> > v3:
> > - C-style comments (Kamil Konieczny)
> > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > v4:
> > - Don't get the logs if it's not a cv3 (Petri)
> >
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > ---
> >  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
> >  lib/igt_chamelium.h                    |  1 +
> >  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
> >  3 files changed, 89 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > index a235f3c8..5cdff70f 100644
> > --- a/lib/igt_chamelium.c
> > +++ b/lib/igt_chamelium.c
> > @@ -129,6 +129,8 @@ struct chamelium {
> >       struct igt_list_head edids;
> >       struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
> >       int port_count;
> > +     // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> > +     bool is_cv3;
> >  };
> >
> >  bool igt_chamelium_allow_fsm_handling = true;
> > @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
> >               usleep(50000);
> >       }
> >
> > +     /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> > +     igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> > +
> >       igt_assert_f(false, "Timed out waiting for %s to get %s\n",
> >                                chamelium_port_get_name(port),
> >                                kmstest_connector_status_str(status));
> > @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >       xmlrpc_value *res;
> >       va_list va_args;
> >       int fsm_trials_left = 5;
> > +     bool did_fault_occur = false;
> > +     char fault_string[1024];
> >
> >       if (strcmp(method_name, "CaptureVideo") == 0
> >           || strcmp(method_name, "StartCapturingVideo") == 0) {
> > @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >                                        format_str, va_args);
> >               va_end(va_args);
> >       }
> > -     igt_assert_f(!chamelium->env.fault_occurred,
> > -                  "Chamelium RPC call[%s] failed: %s\n", method_name,
> > -                  chamelium->env.fault_string);
> > +
> > +     did_fault_occur = chamelium->env.fault_occurred;
> > +     if (did_fault_occur) {
> > +             /*
> > +              * Save the fault string before getting the logs which will
> > +              * clear the string if it is works.
> > +              */
> > +             strncpy(fault_string, chamelium->env.fault_string, 1024);
> > +
> > +             if (strcmp(method_name, "GetChameleondLogs") == 0) {
> > +                     did_fault_occur = false;
> > +                     igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> > +                     igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> > +                     "been cleared for a while and the XMLRPC lib can't consume it all. "
> > +                     "Regardless, we shouldn't fail on failing to get the logs.\n");
> > +             /*
> > +              * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > +              * call it when the xmlrpc failure is for GetChameleondLogs
> > +              * itself as this can cause a recursive behavior.
> > +              */
>
> This comment should be after if (strcmp...), please also align it.
>
done
> > +             } else {
> > +                     char *logs = chamelium_get_logs(chamelium);
> > +                     igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > +                     free(logs);
> > +             }
> > +     }
> > +
> > +     igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > +                  method_name, fault_string);
> >
> >       return res;
> >  }
> > @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> >                    "Couldn't connect to Chamelium for %ds", timeout);
> >  }
> >
> > +/**
> > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > + * @chamelium: The Chamelium instance to use
> > + *
> > + * Returns: The logs from the last time this was called.
> > + */
> > +
> > +const char *chamelium_get_logs(struct chamelium *chamelium)
> > +{
> > +     xmlrpc_value *res;
> > +     const char *logs = NULL;
> > +
> > +     if (!chamelium->is_cv3) {
> > +             igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> > +             return NULL;
> > +     }
> > +
> > +     igt_debug(
> > +             "Calling GetChameleondLogs - Logs returned are from the last time "
>
> Please move this to above line, so
>         igt_debug("Your message ..."
>                   " continued\n");
>
>
done
> > +             "this was called.\n");
> > +
> > +     res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > +     xmlrpc_read_string(&chamelium->env, res, &logs);
> > +     xmlrpc_DECREF(res);
> > +
> > +     return logs;
> > +}
> > +
> >  /**
> >   * chamelium_plug:
> >   * @chamelium: The Chamelium instance to use
> > @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >  {
> >       struct chamelium *chamelium = chamelium_init_rpc_only();
> >       bool mismatching_ports_found = false;
> > +     int port_ids[CHAMELIUM_MAX_PORTS];
> >
> >       if (chamelium == NULL)
> >               return NULL;
> > @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >        * the outputs to grab all supported connectors.*/
> >       igt_display_reset_outputs(display);
> >
> > +     if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> > +             goto error;
> > +     // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
> ------- ^
> Please use C-style comment /* Your comment here */.
>
done
> > +     chamelium->is_cv3 = port_ids[0] == 0;
>
> How is start number of video port related to rpc daemon ?
>
Unfortunately, chamelium doesn't advertise its version, but we need a
way to distinguish between v2 and v3 as they're both in use for the
time being.
One way we did this in a different place is to use the fact that their
port IDs are different. the first port on v2 is 1 while it's 0 on v3.
There is another place where we're using the same idea.
> Regards,
> Kamil
>
> > +
> >       return chamelium;
> >  error:
> >       close(chamelium->drm_fd);
> > diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> > index d979de4a..159c75ec 100644
> > --- a/lib/igt_chamelium.h
> > +++ b/lib/igt_chamelium.h
> > @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
> >
> >  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
> >  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> > +const char *chamelium_get_logs(struct chamelium *chamelium);
> >  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
> >  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
> >  bool chamelium_is_plugged(struct chamelium *chamelium,
> > diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> > index 197d29be..54f8ebfc 100644
> > --- a/tests/chamelium/kms_chamelium_helper.c
> > +++ b/tests/chamelium/kms_chamelium_helper.c
> > @@ -24,7 +24,19 @@
> >   *    Lyude Paul <lyude@redhat.com>
> >   */
> >
> > +#include <fcntl.h>
> > +#include <stdint.h>
> > +#include <string.h>
> > +#include <stdatomic.h>
> > +#include <xf86drmMode.h>
> > +
> > +#include "config.h"
> > +#include "igt.h"
> > +#include "igt_chamelium.h"
> >  #include "igt_edid.h"
> > +#include "igt_eld.h"
> > +#include "igt_vc4.h"
> > +#include "igt_infoframe.h"
> >  #include "kms_chamelium_helper.h"
> >
> >  void chamelium_init_test(chamelium_data_t *data)
> > @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
> >       /* we need to initalize chamelium after igt_display_require */
> >       data->chamelium = chamelium_init(data->drm_fd, &data->display);
> >       igt_require(data->chamelium);
> > +     /*
> > +      * Get the logs so we can reset the chamelium logs at this cursor.
> > +      * The logs are then retrieved when any call fails so we can debug
> > +      * chamelium if needed.
> > +      */
> > +     free(chamelium_get_logs(data->chamelium));
> >
> >       data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
> >
> > --
> > 2.39.1.519.gcb327c4b5f-goog
> >

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-06 18:16   ` Alexandru M Stan
@ 2023-02-06 20:46     ` Mark Yacoub
  2023-02-06 23:51       ` Petri Latvala
  0 siblings, 1 reply; 18+ messages in thread
From: Mark Yacoub @ 2023-02-06 20:46 UTC (permalink / raw)
  To: Alexandru M Stan; +Cc: ihf, igt-dev, seanpaul, markyacoub, khaled.almahallawy

On Mon, Feb 6, 2023 at 1:16 PM Alexandru M Stan <amstan@chromium.org> wrote:
>
> On Fri, Feb 3, 2023 at 8:57 AM Mark Yacoub <markyacoub@chromium.org> wrote:
> >
> > From: Mark Yacoub <markyacoub@chromium.org>
> >
> > [Why]
> > Currently, Chamelium acts like a black box, we can't tell what
> > is going on there when a failure occur. Seeing its logs will
> > allow us to debug better.
> >
> > [How]
> > On chamelium_rpc failure, print out the logs in debug so it
> > wouldn't clutter good tests.
> >
> > v2:
> > - Added missing #includes
> > v3:
> > - C-style comments (Kamil Konieczny)
> > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > v4:
> > - Don't get the logs if it's not a cv3 (Petri)
> No, logs getting should have nothing to do if it's a cv3 or not.
>
> There's no reason why cv2 can't get this API too.
>
It looks like at least some Chamelium 2 don't support this function.
> >
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > ---
> >  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
> >  lib/igt_chamelium.h                    |  1 +
> >  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
> >  3 files changed, 89 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > index a235f3c8..5cdff70f 100644
> > --- a/lib/igt_chamelium.c
> > +++ b/lib/igt_chamelium.c
> > @@ -129,6 +129,8 @@ struct chamelium {
> >         struct igt_list_head edids;
> >         struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
> >         int port_count;
> > +       // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> > +       bool is_cv3;
> >  };
> >
> >  bool igt_chamelium_allow_fsm_handling = true;
> > @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
> >                 usleep(50000);
> >         }
> >
> > +       /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> > +       igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> > +
> >         igt_assert_f(false, "Timed out waiting for %s to get %s\n",
> >                                  chamelium_port_get_name(port),
> >                                  kmstest_connector_status_str(status));
> > @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >         xmlrpc_value *res;
> >         va_list va_args;
> >         int fsm_trials_left = 5;
> > +       bool did_fault_occur = false;
> > +       char fault_string[1024];
> >
> >         if (strcmp(method_name, "CaptureVideo") == 0
> >             || strcmp(method_name, "StartCapturingVideo") == 0) {
> > @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> >                                          format_str, va_args);
> >                 va_end(va_args);
> >         }
> > -       igt_assert_f(!chamelium->env.fault_occurred,
> > -                    "Chamelium RPC call[%s] failed: %s\n", method_name,
> > -                    chamelium->env.fault_string);
> > +
> > +       did_fault_occur = chamelium->env.fault_occurred;
> > +       if (did_fault_occur) {
> Please gather logs for every test invocation regardless of if
> fault_occured. I have seen some recent tests happily claiming that
> things passed ;) but that was not the case. It's still useful to have
> logs for debugging when that happens. It's also useful to see what a
> normal invocation of the test looks like.
>
If tests claim to pass but they should not, then we should improve our
igt_assert and catch expected failure. These sound like flawed tests.
Please let me know where this is required and we can send a patch to
catch expected failures.
Otherwise, not sure if we should spit out the full logs on the screen
on every test, this can spam the output.
> > +               /*
> > +                * Save the fault string before getting the logs which will
> > +                * clear the string if it is works.
> > +                */
> > +               strncpy(fault_string, chamelium->env.fault_string, 1024);
> > +
> > +               if (strcmp(method_name, "GetChameleondLogs") == 0) {
> > +                       did_fault_occur = false;
> > +                       igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> > +                       igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> > +                       "been cleared for a while and the XMLRPC lib can't consume it all. "
> > +                       "Regardless, we shouldn't fail on failing to get the logs.\n");
> > +               /*
> > +                * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > +                * call it when the xmlrpc failure is for GetChameleondLogs
> > +                * itself as this can cause a recursive behavior.
> > +                */
> > +               } else {
> > +                       char *logs = chamelium_get_logs(chamelium);
> > +                       igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > +                       free(logs);
> > +               }
> > +       }
> > +
> > +       igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > +                    method_name, fault_string);
> >
> >         return res;
> >  }
> > @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> >                      "Couldn't connect to Chamelium for %ds", timeout);
> >  }
> >
> > +/**
> > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > + * @chamelium: The Chamelium instance to use
> > + *
> > + * Returns: The logs from the last time this was called.
> > + */
> > +
> > +const char *chamelium_get_logs(struct chamelium *chamelium)
> > +{
> > +       xmlrpc_value *res;
> > +       const char *logs = NULL;
> > +
> > +       if (!chamelium->is_cv3) {
> Please just call GetChameleondLogs all the time, if you get the
> obvious NotImplementedError, you just return, recording the error
> somewhere.
>
I believe Petri did not like this so it was changed accordingly.
> > +               igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> > +               return NULL;
> > +       }
> > +
> > +       igt_debug(
> > +               "Calling GetChameleondLogs - Logs returned are from the last time "
> > +               "this was called.\n");
> > +
> > +       res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > +       xmlrpc_read_string(&chamelium->env, res, &logs);
> > +       xmlrpc_DECREF(res);
> > +
> > +       return logs;
> > +}
> > +
> >  /**
> >   * chamelium_plug:
> >   * @chamelium: The Chamelium instance to use
> > @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >  {
> >         struct chamelium *chamelium = chamelium_init_rpc_only();
> >         bool mismatching_ports_found = false;
> > +       int port_ids[CHAMELIUM_MAX_PORTS];
> >
> >         if (chamelium == NULL)
> >                 return NULL;
> > @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> >          * the outputs to grab all supported connectors.*/
> >         igt_display_reset_outputs(display);
> >
> > +       if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> > +               goto error;
> > +       // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
> Please don't, there should be absolutely no reason that you need to
> keep track of this, and even if you did, some random implementation
> difference is not the proper way to do this.
>
> Prefer feature detection. Same spirit as
> https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
>
ditto
> > +       chamelium->is_cv3 = port_ids[0] == 0;
> > +
> >         return chamelium;
> >  error:
> >         close(chamelium->drm_fd);
> > diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> > index d979de4a..159c75ec 100644
> > --- a/lib/igt_chamelium.h
> > +++ b/lib/igt_chamelium.h
> > @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
> >
> >  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
> >  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> > +const char *chamelium_get_logs(struct chamelium *chamelium);
> >  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
> >  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
> >  bool chamelium_is_plugged(struct chamelium *chamelium,
> > diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> > index 197d29be..54f8ebfc 100644
> > --- a/tests/chamelium/kms_chamelium_helper.c
> > +++ b/tests/chamelium/kms_chamelium_helper.c
> > @@ -24,7 +24,19 @@
> >   *    Lyude Paul <lyude@redhat.com>
> >   */
> >
> > +#include <fcntl.h>
> > +#include <stdint.h>
> > +#include <string.h>
> > +#include <stdatomic.h>
> > +#include <xf86drmMode.h>
> > +
> > +#include "config.h"
> > +#include "igt.h"
> > +#include "igt_chamelium.h"
> >  #include "igt_edid.h"
> > +#include "igt_eld.h"
> > +#include "igt_vc4.h"
> > +#include "igt_infoframe.h"
> >  #include "kms_chamelium_helper.h"
> >
> >  void chamelium_init_test(chamelium_data_t *data)
> > @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
> >         /* we need to initalize chamelium after igt_display_require */
> >         data->chamelium = chamelium_init(data->drm_fd, &data->display);
> >         igt_require(data->chamelium);
> > +       /*
> > +        * Get the logs so we can reset the chamelium logs at this cursor.
> > +        * The logs are then retrieved when any call fails so we can debug
> > +        * chamelium if needed.
> > +        */
> > +       free(chamelium_get_logs(data->chamelium));
> >
> >         data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
> >
> > --
> > 2.39.1.519.gcb327c4b5f-goog
> >
>
> NAK from me (chameleond author for v3), needs more polishing and doing
> things the right way.
>
> Alexandru Stan (amstan)

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

* [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev3)
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
                   ` (5 preceding siblings ...)
  2023-02-05  1:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2023-02-06 21:41 ` Patchwork
  2023-02-07  6:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-06 21:41 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure (rev3)
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12704 -> IGTPW_8453
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/index.html

Participating hosts (36 -> 35)
------------------------------

  Missing    (1): fi-snb-2520m 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-dg1-5:          NOTRUN -> [SKIP][1] ([i915#7828])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/bat-dg1-5/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-5:          [ABORT][2] ([i915#4983]) -> [PASS][3]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/bat-dg1-5/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@slpc:
    - {bat-rplp-1}:       [DMESG-FAIL][4] ([i915#6367] / [i915#7913]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-rplp-1/igt@i915_selftest@live@slpc.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/bat-rplp-1/igt@i915_selftest@live@slpc.html

  * igt@kms_busy@basic@modeset:
    - fi-elk-e7500:       [FAIL][6] -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/fi-elk-e7500/igt@kms_busy@basic@modeset.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/fi-elk-e7500/igt@kms_busy@basic@modeset.html

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

  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#7443]: https://gitlab.freedesktop.org/drm/intel/issues/7443
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7982]: https://gitlab.freedesktop.org/drm/intel/issues/7982


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7152 -> IGTPW_8453

  CI-20190529: 20190529
  CI_DRM_12704: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8453: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/index.html
  IGT_7152: 790b81207a0a6705213ec5ea645bc5e223b2ce1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-06 20:46     ` Mark Yacoub
@ 2023-02-06 23:51       ` Petri Latvala
  2023-02-07  4:18         ` Alexandru M Stan
  0 siblings, 1 reply; 18+ messages in thread
From: Petri Latvala @ 2023-02-06 23:51 UTC (permalink / raw)
  To: Mark Yacoub
  Cc: Alexandru M Stan, ihf, igt-dev, seanpaul, markyacoub,
	khaled.almahallawy

On Mon, Feb 06, 2023 at 03:46:33PM -0500, Mark Yacoub wrote:
> On Mon, Feb 6, 2023 at 1:16 PM Alexandru M Stan <amstan@chromium.org> wrote:
> >
> > On Fri, Feb 3, 2023 at 8:57 AM Mark Yacoub <markyacoub@chromium.org> wrote:
> > >
> > > From: Mark Yacoub <markyacoub@chromium.org>
> > >
> > > [Why]
> > > Currently, Chamelium acts like a black box, we can't tell what
> > > is going on there when a failure occur. Seeing its logs will
> > > allow us to debug better.
> > >
> > > [How]
> > > On chamelium_rpc failure, print out the logs in debug so it
> > > wouldn't clutter good tests.
> > >
> > > v2:
> > > - Added missing #includes
> > > v3:
> > > - C-style comments (Kamil Konieczny)
> > > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > > v4:
> > > - Don't get the logs if it's not a cv3 (Petri)
> > No, logs getting should have nothing to do if it's a cv3 or not.
> >
> > There's no reason why cv2 can't get this API too.
> >
> It looks like at least some Chamelium 2 don't support this function.
> > >
> > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > > ---
> > >  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
> > >  lib/igt_chamelium.h                    |  1 +
> > >  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
> > >  3 files changed, 89 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > > index a235f3c8..5cdff70f 100644
> > > --- a/lib/igt_chamelium.c
> > > +++ b/lib/igt_chamelium.c
> > > @@ -129,6 +129,8 @@ struct chamelium {
> > >         struct igt_list_head edids;
> > >         struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
> > >         int port_count;
> > > +       // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> > > +       bool is_cv3;
> > >  };
> > >
> > >  bool igt_chamelium_allow_fsm_handling = true;
> > > @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
> > >                 usleep(50000);
> > >         }
> > >
> > > +       /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> > > +       igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> > > +
> > >         igt_assert_f(false, "Timed out waiting for %s to get %s\n",
> > >                                  chamelium_port_get_name(port),
> > >                                  kmstest_connector_status_str(status));
> > > @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> > >         xmlrpc_value *res;
> > >         va_list va_args;
> > >         int fsm_trials_left = 5;
> > > +       bool did_fault_occur = false;
> > > +       char fault_string[1024];
> > >
> > >         if (strcmp(method_name, "CaptureVideo") == 0
> > >             || strcmp(method_name, "StartCapturingVideo") == 0) {
> > > @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> > >                                          format_str, va_args);
> > >                 va_end(va_args);
> > >         }
> > > -       igt_assert_f(!chamelium->env.fault_occurred,
> > > -                    "Chamelium RPC call[%s] failed: %s\n", method_name,
> > > -                    chamelium->env.fault_string);
> > > +
> > > +       did_fault_occur = chamelium->env.fault_occurred;
> > > +       if (did_fault_occur) {
> > Please gather logs for every test invocation regardless of if
> > fault_occured. I have seen some recent tests happily claiming that
> > things passed ;) but that was not the case. It's still useful to have
> > logs for debugging when that happens. It's also useful to see what a
> > normal invocation of the test looks like.
> >
> If tests claim to pass but they should not, then we should improve our
> igt_assert and catch expected failure. These sound like flawed tests.
> Please let me know where this is required and we can send a patch to
> catch expected failures.
> Otherwise, not sure if we should spit out the full logs on the screen
> on every test, this can spam the output.
> > > +               /*
> > > +                * Save the fault string before getting the logs which will
> > > +                * clear the string if it is works.
> > > +                */
> > > +               strncpy(fault_string, chamelium->env.fault_string, 1024);
> > > +
> > > +               if (strcmp(method_name, "GetChameleondLogs") == 0) {
> > > +                       did_fault_occur = false;
> > > +                       igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> > > +                       igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> > > +                       "been cleared for a while and the XMLRPC lib can't consume it all. "
> > > +                       "Regardless, we shouldn't fail on failing to get the logs.\n");
> > > +               /*
> > > +                * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > > +                * call it when the xmlrpc failure is for GetChameleondLogs
> > > +                * itself as this can cause a recursive behavior.
> > > +                */
> > > +               } else {
> > > +                       char *logs = chamelium_get_logs(chamelium);
> > > +                       igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > > +                       free(logs);
> > > +               }
> > > +       }
> > > +
> > > +       igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > > +                    method_name, fault_string);
> > >
> > >         return res;
> > >  }
> > > @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> > >                      "Couldn't connect to Chamelium for %ds", timeout);
> > >  }
> > >
> > > +/**
> > > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > > + * @chamelium: The Chamelium instance to use
> > > + *
> > > + * Returns: The logs from the last time this was called.
> > > + */
> > > +
> > > +const char *chamelium_get_logs(struct chamelium *chamelium)
> > > +{
> > > +       xmlrpc_value *res;
> > > +       const char *logs = NULL;
> > > +
> > > +       if (!chamelium->is_cv3) {
> > Please just call GetChameleondLogs all the time, if you get the
> > obvious NotImplementedError, you just return, recording the error
> > somewhere.
> >
> I believe Petri did not like this so it was changed accordingly.

But I advocated for checking whether the method was there by actually
checking whether it's there, not by guessing whether it's there based
on a heuristic...


-- 
Petri Latvala


> > > +               igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> > > +               return NULL;
> > > +       }
> > > +
> > > +       igt_debug(
> > > +               "Calling GetChameleondLogs - Logs returned are from the last time "
> > > +               "this was called.\n");
> > > +
> > > +       res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > > +       xmlrpc_read_string(&chamelium->env, res, &logs);
> > > +       xmlrpc_DECREF(res);
> > > +
> > > +       return logs;
> > > +}
> > > +
> > >  /**
> > >   * chamelium_plug:
> > >   * @chamelium: The Chamelium instance to use
> > > @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> > >  {
> > >         struct chamelium *chamelium = chamelium_init_rpc_only();
> > >         bool mismatching_ports_found = false;
> > > +       int port_ids[CHAMELIUM_MAX_PORTS];
> > >
> > >         if (chamelium == NULL)
> > >                 return NULL;
> > > @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> > >          * the outputs to grab all supported connectors.*/
> > >         igt_display_reset_outputs(display);
> > >
> > > +       if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> > > +               goto error;
> > > +       // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
> > Please don't, there should be absolutely no reason that you need to
> > keep track of this, and even if you did, some random implementation
> > difference is not the proper way to do this.
> >
> > Prefer feature detection. Same spirit as
> > https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
> >
> ditto
> > > +       chamelium->is_cv3 = port_ids[0] == 0;
> > > +
> > >         return chamelium;
> > >  error:
> > >         close(chamelium->drm_fd);
> > > diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> > > index d979de4a..159c75ec 100644
> > > --- a/lib/igt_chamelium.h
> > > +++ b/lib/igt_chamelium.h
> > > @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
> > >
> > >  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
> > >  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> > > +const char *chamelium_get_logs(struct chamelium *chamelium);
> > >  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
> > >  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
> > >  bool chamelium_is_plugged(struct chamelium *chamelium,
> > > diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> > > index 197d29be..54f8ebfc 100644
> > > --- a/tests/chamelium/kms_chamelium_helper.c
> > > +++ b/tests/chamelium/kms_chamelium_helper.c
> > > @@ -24,7 +24,19 @@
> > >   *    Lyude Paul <lyude@redhat.com>
> > >   */
> > >
> > > +#include <fcntl.h>
> > > +#include <stdint.h>
> > > +#include <string.h>
> > > +#include <stdatomic.h>
> > > +#include <xf86drmMode.h>
> > > +
> > > +#include "config.h"
> > > +#include "igt.h"
> > > +#include "igt_chamelium.h"
> > >  #include "igt_edid.h"
> > > +#include "igt_eld.h"
> > > +#include "igt_vc4.h"
> > > +#include "igt_infoframe.h"
> > >  #include "kms_chamelium_helper.h"
> > >
> > >  void chamelium_init_test(chamelium_data_t *data)
> > > @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
> > >         /* we need to initalize chamelium after igt_display_require */
> > >         data->chamelium = chamelium_init(data->drm_fd, &data->display);
> > >         igt_require(data->chamelium);
> > > +       /*
> > > +        * Get the logs so we can reset the chamelium logs at this cursor.
> > > +        * The logs are then retrieved when any call fails so we can debug
> > > +        * chamelium if needed.
> > > +        */
> > > +       free(chamelium_get_logs(data->chamelium));
> > >
> > >         data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
> > >
> > > --
> > > 2.39.1.519.gcb327c4b5f-goog
> > >
> >
> > NAK from me (chameleond author for v3), needs more polishing and doing
> > things the right way.
> >
> > Alexandru Stan (amstan)

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

* Re: [igt-dev] [PATCH v4] Chamelium: Get Chamelium Logs on RPC failure
  2023-02-06 23:51       ` Petri Latvala
@ 2023-02-07  4:18         ` Alexandru M Stan
  0 siblings, 0 replies; 18+ messages in thread
From: Alexandru M Stan @ 2023-02-07  4:18 UTC (permalink / raw)
  To: Petri Latvala; +Cc: ihf, igt-dev, seanpaul, markyacoub, khaled.almahallawy

 Hello Petri

On Mon, Feb 6, 2023 at 3:52 PM Petri Latvala <adrinael@adrinael.net> wrote:
>
> On Mon, Feb 06, 2023 at 03:46:33PM -0500, Mark Yacoub wrote:
> > On Mon, Feb 6, 2023 at 1:16 PM Alexandru M Stan <amstan@chromium.org> wrote:
> > >
> > > On Fri, Feb 3, 2023 at 8:57 AM Mark Yacoub <markyacoub@chromium.org> wrote:
> > > >
> > > > From: Mark Yacoub <markyacoub@chromium.org>
> > > >
> > > > [Why]
> > > > Currently, Chamelium acts like a black box, we can't tell what
> > > > is going on there when a failure occur. Seeing its logs will
> > > > allow us to debug better.
> > > >
> > > > [How]
> > > > On chamelium_rpc failure, print out the logs in debug so it
> > > > wouldn't clutter good tests.
> > > >
> > > > v2:
> > > > - Added missing #includes
> > > > v3:
> > > > - C-style comments (Kamil Konieczny)
> > > > - Cut commit messages to 65 char tops (Kamil Konieczny)
> > > > v4:
> > > > - Don't get the logs if it's not a cv3 (Petri)
> > > No, logs getting should have nothing to do if it's a cv3 or not.
> > >
> > > There's no reason why cv2 can't get this API too.
> > >
> > It looks like at least some Chamelium 2 don't support this function.
> > > >
> > > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > > > ---
> > > >  lib/igt_chamelium.c                    | 73 ++++++++++++++++++++++++--
> > > >  lib/igt_chamelium.h                    |  1 +
> > > >  tests/chamelium/kms_chamelium_helper.c | 18 +++++++
> > > >  3 files changed, 89 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> > > > index a235f3c8..5cdff70f 100644
> > > > --- a/lib/igt_chamelium.c
> > > > +++ b/lib/igt_chamelium.c
> > > > @@ -129,6 +129,8 @@ struct chamelium {
> > > >         struct igt_list_head edids;
> > > >         struct chamelium_port ports[CHAMELIUM_MAX_PORTS];
> > > >         int port_count;
> > > > +       // Chamelium V3 requires some work arounds and has some extra functionalities. This keeps things safe.
> > > > +       bool is_cv3;
> > > >  };
> > > >
> > > >  bool igt_chamelium_allow_fsm_handling = true;
> > > > @@ -447,6 +449,9 @@ chamelium_wait_for_conn_status_change(igt_display_t *display,
> > > >                 usleep(50000);
> > > >         }
> > > >
> > > > +       /* If we timeout, it means Chamelium didn't respond on time. Print its logs*/
> > > > +       igt_debug("Timeout. Chamelium logs:\n%s\n", chamelium_get_logs(chamelium));
> > > > +
> > > >         igt_assert_f(false, "Timed out waiting for %s to get %s\n",
> > > >                                  chamelium_port_get_name(port),
> > > >                                  kmstest_connector_status_str(status));
> > > > @@ -658,6 +663,8 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> > > >         xmlrpc_value *res;
> > > >         va_list va_args;
> > > >         int fsm_trials_left = 5;
> > > > +       bool did_fault_occur = false;
> > > > +       char fault_string[1024];
> > > >
> > > >         if (strcmp(method_name, "CaptureVideo") == 0
> > > >             || strcmp(method_name, "StartCapturingVideo") == 0) {
> > > > @@ -680,9 +687,35 @@ static xmlrpc_value *chamelium_rpc(struct chamelium *chamelium,
> > > >                                          format_str, va_args);
> > > >                 va_end(va_args);
> > > >         }
> > > > -       igt_assert_f(!chamelium->env.fault_occurred,
> > > > -                    "Chamelium RPC call[%s] failed: %s\n", method_name,
> > > > -                    chamelium->env.fault_string);
> > > > +
> > > > +       did_fault_occur = chamelium->env.fault_occurred;
> > > > +       if (did_fault_occur) {
> > > Please gather logs for every test invocation regardless of if
> > > fault_occured. I have seen some recent tests happily claiming that
> > > things passed ;) but that was not the case. It's still useful to have
> > > logs for debugging when that happens. It's also useful to see what a
> > > normal invocation of the test looks like.
> > >
> > If tests claim to pass but they should not, then we should improve our
> > igt_assert and catch expected failure. These sound like flawed tests.
> > Please let me know where this is required and we can send a patch to
> > catch expected failures.
> > Otherwise, not sure if we should spit out the full logs on the screen
> > on every test, this can spam the output.
> > > > +               /*
> > > > +                * Save the fault string before getting the logs which will
> > > > +                * clear the string if it is works.
> > > > +                */
> > > > +               strncpy(fault_string, chamelium->env.fault_string, 1024);
> > > > +
> > > > +               if (strcmp(method_name, "GetChameleondLogs") == 0) {
> > > > +                       did_fault_occur = false;
> > > > +                       igt_debug("Failed to get chamelium logs: %s\n", fault_string);
> > > > +                       igt_debug("Sometimes this happens at the beginning of the test when the logs haven't "
> > > > +                       "been cleared for a while and the XMLRPC lib can't consume it all. "
> > > > +                       "Regardless, we shouldn't fail on failing to get the logs.\n");
> > > > +               /*
> > > > +                * We call GetChameleondLogs on an xmlrpc failure. Let's not
> > > > +                * call it when the xmlrpc failure is for GetChameleondLogs
> > > > +                * itself as this can cause a recursive behavior.
> > > > +                */
> > > > +               } else {
> > > > +                       char *logs = chamelium_get_logs(chamelium);
> > > > +                       igt_debug("CHAMELIUM LOGS:\n%s\n", logs);
> > > > +                       free(logs);
> > > > +               }
> > > > +       }
> > > > +
> > > > +       igt_assert_f(!did_fault_occur, "Chamelium RPC call [%s] failed: %s\n",
> > > > +                    method_name, fault_string);
> > > >
> > > >         return res;
> > > >  }
> > > > @@ -737,6 +770,34 @@ void chamelium_assert_reachable(struct chamelium *chamelium, int timeout)
> > > >                      "Couldn't connect to Chamelium for %ds", timeout);
> > > >  }
> > > >
> > > > +/**
> > > > + * chamelium_get_logs - Get the logs from the chamelium daemon
> > > > + * @chamelium: The Chamelium instance to use
> > > > + *
> > > > + * Returns: The logs from the last time this was called.
> > > > + */
> > > > +
> > > > +const char *chamelium_get_logs(struct chamelium *chamelium)
> > > > +{
> > > > +       xmlrpc_value *res;
> > > > +       const char *logs = NULL;
> > > > +
> > > > +       if (!chamelium->is_cv3) {
> > > Please just call GetChameleondLogs all the time, if you get the
> > > obvious NotImplementedError, you just return, recording the error
> > > somewhere.
> > >
> > I believe Petri did not like this so it was changed accordingly.
>
> But I advocated for checking whether the method was there by actually
> checking whether it's there, not by guessing whether it's there based
> on a heuristic...
>
>
> --
> Petri Latvala

Thanks, it looks like we agree that we should do the GetChameleondLogs
method discovery somehow (but without relying on unrelated behavior).

For what it's worth, if you excuse my pythonness (I think you can do
some of it with your C xmlrpc library), I would consider these pretty
equivalent (but there are some gotchas in our case):

1. ```
if hasattr(p,"GetChameleondLogs"):
    return p.GetChameleondLogs()
else:
    # this might never happen, even on cv2
    return "" # no logs
```

2. ```
try:
    return p.GetChameleondLogs()
exception Exception as e:
    print("Error getting logs:", e) # we do want to record that we
have an error with logs
    # but still keep going:
    return "" # no logs
```

I like the `2.` better since it handles any potential exceptions
during logs gathering that might happen (including
NotImplementedError, but also stuff like journalctl failing to read
chameleond logs kind of errors). `1.` might have been okish too, but
you're likely to get it as hasattr==True even on chameleon v2 due to
both v2 and v3 inhereting from this base class's method
https://chromium.googlesource.com/chromiumos/platform/chameleon/+/refs/heads/main/chameleond/interface.py#19

Yes, for `2.` you should get an extra error saying logs were not
acquired when using it with a cv2, but test flow should continue just
as it did before the patch.

Definitely don't do `3.` (which is believe is what v3 of this patch was):```
    return p.GetChameleondLogs()
    # any errors here crash the tests
```

Regards,
Alexandru Stan (amstan)

>
>
> > > > +               igt_debug("Chamelium is not a Cv3, not calling GetChameleondLogs\n");
> > > > +               return NULL;
> > > > +       }
> > > > +
> > > > +       igt_debug(
> > > > +               "Calling GetChameleondLogs - Logs returned are from the last time "
> > > > +               "this was called.\n");
> > > > +
> > > > +       res = chamelium_rpc(chamelium, NULL, "GetChameleondLogs", "(s)", "IGT");
> > > > +       xmlrpc_read_string(&chamelium->env, res, &logs);
> > > > +       xmlrpc_DECREF(res);
> > > > +
> > > > +       return logs;
> > > > +}
> > > > +
> > > >  /**
> > > >   * chamelium_plug:
> > > >   * @chamelium: The Chamelium instance to use
> > > > @@ -2890,6 +2951,7 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> > > >  {
> > > >         struct chamelium *chamelium = chamelium_init_rpc_only();
> > > >         bool mismatching_ports_found = false;
> > > > +       int port_ids[CHAMELIUM_MAX_PORTS];
> > > >
> > > >         if (chamelium == NULL)
> > > >                 return NULL;
> > > > @@ -2958,6 +3020,11 @@ struct chamelium *chamelium_init(int drm_fd, igt_display_t *display)
> > > >          * the outputs to grab all supported connectors.*/
> > > >         igt_display_reset_outputs(display);
> > > >
> > > > +       if (chamelium_get_video_ports(chamelium, port_ids) <= 0)
> > > > +               goto error;
> > > > +       // Chamelium V3 port IDs start with 0, while V2 port IDs start with 1.
> > > Please don't, there should be absolutely no reason that you need to
> > > keep track of this, and even if you did, some random implementation
> > > difference is not the proper way to do this.
> > >
> > > Prefer feature detection. Same spirit as
> > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
> > >
> > ditto
> > > > +       chamelium->is_cv3 = port_ids[0] == 0;
> > > > +
> > > >         return chamelium;
> > > >  error:
> > > >         close(chamelium->drm_fd);
> > > > diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> > > > index d979de4a..159c75ec 100644
> > > > --- a/lib/igt_chamelium.h
> > > > +++ b/lib/igt_chamelium.h
> > > > @@ -159,6 +159,7 @@ chamelium_reset_state(igt_display_t *display,
> > > >
> > > >  bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
> > > >  void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);
> > > > +const char *chamelium_get_logs(struct chamelium *chamelium);
> > > >  void chamelium_plug(struct chamelium *chamelium, struct chamelium_port *port);
> > > >  void chamelium_unplug(struct chamelium *chamelium, struct chamelium_port *port);
> > > >  bool chamelium_is_plugged(struct chamelium *chamelium,
> > > > diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/kms_chamelium_helper.c
> > > > index 197d29be..54f8ebfc 100644
> > > > --- a/tests/chamelium/kms_chamelium_helper.c
> > > > +++ b/tests/chamelium/kms_chamelium_helper.c
> > > > @@ -24,7 +24,19 @@
> > > >   *    Lyude Paul <lyude@redhat.com>
> > > >   */
> > > >
> > > > +#include <fcntl.h>
> > > > +#include <stdint.h>
> > > > +#include <string.h>
> > > > +#include <stdatomic.h>
> > > > +#include <xf86drmMode.h>
> > > > +
> > > > +#include "config.h"
> > > > +#include "igt.h"
> > > > +#include "igt_chamelium.h"
> > > >  #include "igt_edid.h"
> > > > +#include "igt_eld.h"
> > > > +#include "igt_vc4.h"
> > > > +#include "igt_infoframe.h"
> > > >  #include "kms_chamelium_helper.h"
> > > >
> > > >  void chamelium_init_test(chamelium_data_t *data)
> > > > @@ -47,6 +59,12 @@ void chamelium_init_test(chamelium_data_t *data)
> > > >         /* we need to initalize chamelium after igt_display_require */
> > > >         data->chamelium = chamelium_init(data->drm_fd, &data->display);
> > > >         igt_require(data->chamelium);
> > > > +       /*
> > > > +        * Get the logs so we can reset the chamelium logs at this cursor.
> > > > +        * The logs are then retrieved when any call fails so we can debug
> > > > +        * chamelium if needed.
> > > > +        */
> > > > +       free(chamelium_get_logs(data->chamelium));
> > > >
> > > >         data->ports = chamelium_get_ports(data->chamelium, &data->port_count);
> > > >
> > > > --
> > > > 2.39.1.519.gcb327c4b5f-goog
> > > >
> > >
> > > NAK from me (chameleond author for v3), needs more polishing and doing
> > > things the right way.
> > >
> > > Alexandru Stan (amstan)

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

* [igt-dev] ✓ Fi.CI.IGT: success for Chamelium: Get Chamelium Logs on RPC failure (rev3)
  2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
                   ` (6 preceding siblings ...)
  2023-02-06 21:41 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev3) Patchwork
@ 2023-02-07  6:30 ` Patchwork
  7 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2023-02-07  6:30 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev

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

== Series Details ==

Series: Chamelium: Get Chamelium Logs on RPC failure (rev3)
URL   : https://patchwork.freedesktop.org/series/113615/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12704_full -> IGTPW_8453_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/index.html

Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Suppressed ####

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

  * {igt@kms_dsc@dsc-basic}:
    - {shard-tglu}:       [SKIP][1] ([i915#3840]) -> [SKIP][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-1/igt@kms_dsc@dsc-basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-6/igt@kms_dsc@dsc-basic.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][3] -> [FAIL][4] ([i915#2842])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk7/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([i915#2346])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk2/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size.html

  * igt@kms_dsc@dsc-with-bpc-formats:
    - shard-glk:          NOTRUN -> [SKIP][7] ([fdo#109271]) +8 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk6/igt@kms_dsc@dsc-with-bpc-formats.html

  
#### Possible fixes ####

  * igt@drm_fdinfo@virtual-idle:
    - {shard-rkl}:        [FAIL][8] ([i915#7742]) -> [PASS][9] +2 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@drm_fdinfo@virtual-idle.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-2/igt@drm_fdinfo@virtual-idle.html

  * igt@drm_read@fault-buffer:
    - {shard-rkl}:        [SKIP][10] ([i915#4098]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@drm_read@fault-buffer.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-6/igt@drm_read@fault-buffer.html

  * igt@fbdev@unaligned-write:
    - {shard-rkl}:        [SKIP][12] ([i915#2582]) -> [PASS][13] +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@fbdev@unaligned-write.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-6/igt@fbdev@unaligned-write.html

  * igt@gem_exec_balancer@fairslice:
    - {shard-rkl}:        [SKIP][14] ([i915#6259]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@gem_exec_balancer@fairslice.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-1/igt@gem_exec_balancer@fairslice.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [FAIL][16] ([i915#2842]) -> [PASS][17] +2 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk3/igt@gem_exec_fair@basic-pace-share@rcs0.html
    - {shard-tglu}:       [FAIL][18] ([i915#2842]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-6/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-1/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - {shard-rkl}:        [FAIL][20] ([i915#2842]) -> [PASS][21] +3 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@gem_exec_fair@basic-pace@rcs0.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-5/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_reloc@basic-write-read:
    - {shard-rkl}:        [SKIP][22] ([i915#3281]) -> [PASS][23] +3 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-1/igt@gem_exec_reloc@basic-write-read.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-5/igt@gem_exec_reloc@basic-write-read.html

  * igt@gem_softpin@noreloc-s3:
    - {shard-rkl}:        [ABORT][24] -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-4/igt@gem_softpin@noreloc-s3.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-4/igt@gem_softpin@noreloc-s3.html

  * igt@gen9_exec_parse@batch-invalid-length:
    - {shard-rkl}:        [SKIP][26] ([i915#2527]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@gen9_exec_parse@batch-invalid-length.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-5/igt@gen9_exec_parse@batch-invalid-length.html

  * igt@i915_pm_rc6_residency@rc6-idle@vcs0:
    - {shard-dg1}:        [FAIL][28] ([i915#3591]) -> [PASS][29] +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-dg1-14/igt@i915_pm_rc6_residency@rc6-idle@vcs0.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-dg1-18/igt@i915_pm_rc6_residency@rc6-idle@vcs0.html

  * igt@i915_pm_rpm@fences:
    - {shard-tglu}:       [SKIP][30] ([i915#1849]) -> [PASS][31] +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-6/igt@i915_pm_rpm@fences.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-3/igt@i915_pm_rpm@fences.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-180:
    - {shard-tglu}:       [SKIP][32] ([i915#1845] / [i915#7651]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-6/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-1/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html

  * igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary:
    - {shard-rkl}:        [SKIP][34] ([i915#1849] / [i915#4098]) -> [PASS][35] +2 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-1/igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary.html

  * igt@kms_psr@cursor_render:
    - {shard-rkl}:        [SKIP][36] ([i915#1072]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-4/igt@kms_psr@cursor_render.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-6/igt@kms_psr@cursor_render.html

  * igt@kms_universal_plane@disable-primary-vs-flip-pipe-b:
    - {shard-rkl}:        [SKIP][38] ([i915#1845] / [i915#4098]) -> [PASS][39] +5 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@kms_universal_plane@disable-primary-vs-flip-pipe-b.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-6/igt@kms_universal_plane@disable-primary-vs-flip-pipe-b.html

  * igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a:
    - {shard-tglu}:       [SKIP][40] ([fdo#109274]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-6/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-1/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a.html

  * igt@kms_vblank@pipe-d-wait-busy:
    - {shard-tglu}:       [SKIP][42] ([i915#7651]) -> [PASS][43] +1 similar issue
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-tglu-6/igt@kms_vblank@pipe-d-wait-busy.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-tglu-1/igt@kms_vblank@pipe-d-wait-busy.html

  * igt@perf@polling-small-buf:
    - {shard-rkl}:        [FAIL][44] ([i915#1722]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-2/igt@perf@polling-small-buf.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-rkl-5/igt@perf@polling-small-buf.html

  * igt@perf@stress-open-close:
    - shard-glk:          [ABORT][46] ([i915#5213]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk7/igt@perf@stress-open-close.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk4/igt@perf@stress-open-close.html

  * igt@perf_pmu@busy-accuracy-2@vecs0:
    - shard-glk:          [FAIL][48] -> [PASS][49] +4 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@perf_pmu@busy-accuracy-2@vecs0.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk8/igt@perf_pmu@busy-accuracy-2@vecs0.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-glk:          [TIMEOUT][50] -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@perf_pmu@cpu-hotplug.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/shard-glk4/igt@perf_pmu@cpu-hotplug.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#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
  [i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
  [i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
  [i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
  [i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
  [i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7152 -> IGTPW_8453

  CI-20190529: 20190529
  CI_DRM_12704: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8453: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8453/index.html
  IGT_7152: 790b81207a0a6705213ec5ea645bc5e223b2ce1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

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

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

end of thread, other threads:[~2023-02-07  6:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-02 18:01 [igt-dev] [PATCH v3] Chamelium: Get Chamelium Logs on RPC failure Mark Yacoub
2023-02-02 18:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-02-02 23:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-03  9:19 ` [igt-dev] [PATCH v3] " Kamil Konieczny
2023-02-03 10:12   ` Petri Latvala
2023-02-03 16:57 ` [igt-dev] [PATCH v4] " Mark Yacoub
2023-02-06 17:18   ` Kamil Konieczny
2023-02-06 18:01     ` Alexandru M Stan
2023-02-06 20:41     ` Mark Yacoub
2023-02-06 18:16   ` Alexandru M Stan
2023-02-06 20:46     ` Mark Yacoub
2023-02-06 23:51       ` Petri Latvala
2023-02-07  4:18         ` Alexandru M Stan
2023-02-06 20:38   ` Mark Yacoub
2023-02-03 17:42 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev2) Patchwork
2023-02-05  1:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-06 21:41 ` [igt-dev] ✓ Fi.CI.BAT: success for Chamelium: Get Chamelium Logs on RPC failure (rev3) Patchwork
2023-02-07  6:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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