Skip to contentSkip to conversation

lib/igt_kmemleak: library to interact with kmemleak

RFC PATCH In review Peter Senna Tschudin 4 participants 9 messages Dec 16, 2024 – Jan 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 lib/igt_kmemleak: library to interact with kmemleak

From: Peter Senna Tschudin <[email protected]>

Adds a simple library for interacting with kmemleak ispired by 'tests/amdgpu/amd_mem_leak.c'. Also adds unit testing for the library.

To use the library include "igt_kmemleak.h" and:
1. igt_kmemleak_init(NULL) /* Returns true if kmemleak is active */
2. igt_kmemleak_clear()
3. /* Run your test */
4. igt_kmemleak_scan()
5. if (igt_kmemleak_found_leaks()) igt_kmemleak_cp_leaks_file(*dst)

---
 lib/igt_kmemleak.c       | 154 +++++++++++++++++++++
 lib/igt_kmemleak.h       |  69 ++++++++++
 lib/meson.build          |   1 +
 lib/tests/igt_kmemleak.c | 291 +++++++++++++++++++++++++++++++++++++++
 lib/tests/meson.build    |   1 +
 5 files changed, 516 insertions(+)
 create mode 100644 lib/igt_kmemleak.c
 create mode 100644 lib/igt_kmemleak.h
 create mode 100644 lib/tests/igt_kmemleak.c
lib/igt_kmemleak.c new file +154 -0
new file mode 100644
index 000000000..02ee0361d
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <libudev.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "igt_core.h"
+#include "igt_device_scan.h"
+#include "igt_kmemleak.h"
+#include "igt_kmod.h"
+#include "igt_list.h"
+
+/* We can change the path for unit testing, see igt_kmemleak_init() */
+static char igt_kmemleak_file[256] = "/sys/kernel/debug/kmemleak";
+
+/**
+ * igt_kmemeak_init:
+ * @igt_kmemleak_file: update the path to kmemleak file to enable unit testing
+ *
+ * Check if kmemleak is enabled in the kernel, if debugfs is mounted and
+ * if kmemleak file is present and readable.
+ *
+ * Returns: true if kmemleak is enabled, false otherwise.
+ */
+bool igt_kmemleak_init(const char *unit_test_kmemleak_file)
+{
+	FILE *fp;
+
+	if (unit_test_kmemleak_file)
+		snprintf(igt_kmemleak_file,
+			 sizeof(igt_kmemleak_file),
+			 "%s",
+			 unit_test_kmemleak_file);
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cmd:
+ * @cmd: command to send to kmemleak
+ *
+ * Send a command to kmemleak.
+ *
+ * Returns: true if sending the command was successful, false otherwise.
+ */
+bool igt_kmemleak_cmd(const char *cmd)
+{
+	FILE *fp;
+
+	fp = fopen(igt_kmemleak_file, "r+");
+	if (!fp)
+		return false;
+
+	if (fwrite(cmd, 1, strlen(cmd), fp) != strlen(cmd)) {
+		fclose(fp);
+		return false;
+	}
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_scan:
+ *
+ * Trigger an immediate scan on kmemleak.
+ *
+ * Returns: true if sending the command to scan was successful, false otherwise.
+ */
+bool igt_kmemleak_scan(void)
+{
+	return igt_kmemleak_cmd("scan");
+}
+
+/**
+ * igt_kmemeak_clear:
+ *
+ * Trigger an immediate clear on kmemleak.
+ *
+ * Returns: true if sending the command to clear was successful, false
+ * otherwise.
+ */
+bool igt_kmemleak_clear(void)
+{
+	return igt_kmemleak_cmd("clear");
+}
+
+/**
+ * igt_kmemeak_found_leaks:
+ *
+ * Check if kmemleak found any leaks.
+ *
+ * Returns: true if kmemleak found any leaks, false otherwise.
+ */
+bool igt_kmemleak_found_leaks(void)
+{
+	FILE *fp;
+	char buf[1];
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	if (fread(buf, 1, 1, fp) <= 0) {
+		fclose(fp);
+		return false;
+	}
+
+	/* fread() did read 1 char */
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cp_leaks_file:
+ * @dst: path of destination file including the file name
+ *
+ * Copy kmemleak file to dst.
+ *
+ * Returns: true if copy was successful, false otherwise
+ */
+bool igt_kmemleak_cp_leaks_file(const char *dst)
+{
+	FILE *src, *dest;
+	char buf[1024];
+	size_t n;
+
+	src = fopen(igt_kmemleak_file, "r");
+	if (!src)
+		return false;
+
+	dest = fopen(dst, "w");
+	if (!dest) {
+		fclose(src);
+		return false;
+	}
+
+	while ((n = fread(buf, 1, sizeof(buf), src)) > 0)
+		fwrite(buf, 1, n, dest);
+
+	fclose(src);
+	fclose(dest);
+	return true;
+}
lib/igt_kmemleak.h new file +69 -0

69 lines not on this page · raw message

lib/meson.build +1 -0
index 640513e6c..24423ef37 100644
@@ -96,6 +96,7 @@ lib_sources = [
 	'igt_dummyload.c',
 	'igt_store.c',
 	'uwildmat/uwildmat.c',
+	'igt_kmemleak.c',
 	'igt_kmod.c',
 	'igt_ktap.c',
 	'igt_panfrost.c',
lib/tests/igt_kmemleak.c new file +291 -0

291 lines not on this page · raw message

lib/tests/meson.build +1 -0
index df8092638..bcbea9ba4 100644
@@ -15,6 +15,7 @@ lib_tests = [
         'igt_ktap_parser',
 	'igt_list_only',
 	'igt_invalid_subtest_name',
+	'igt_kmemleak',
 	'igt_nesting',
 	'igt_no_exit',
 	'igt_runnercomms_packets',
Signature · 1 line
2.34.1
#1 lore raw

✗ GitLab.Pipeline: warning for lib/igt_kmemleak: library to interact with kmemleak

== Series Details ==

== Series Details ==

Series: lib/igt_kmemleak: library to interact with kmemleak
URL : https://patchwork.freedesktop.org/series/142673/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1331059 for the overview.

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/68287523):

  $ /host/bin/curl -s -L --cacert /host/ca-certificates.crt --retry 4 -f --retry-delay 60 https://gitlab.freedesktop.org/freedesktop/helm-gitlab-infra/-/raw/main/runner-gating/runner-gating.sh | sh -s -- pre_get_sources_script
  Checking if the user of the pipeline is allowed...
  Checking if the job's project is part of a well-known group...
  Thank you for contributing to freedesktop.org
  Fetching changes...
  Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Checking out 9f8406e8 as detached HEAD (ref is intel/IGTPW_12327)...
  Removing build/
  Removing scripts/__pycache__/

Skipping Git submodules setup
section_end:1734389598:get_sources
section_start:1734389598:step_script
Executing "step_script" stage of the job script
Using docker image sha256:4a4103f1a476d355d866b481ff96ac05a32a3a715cefcc1cbc1356a8959fb5f8 for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-armhf:commit-9f8406e86d1d9fdce5fea06e856390c7c968cb48 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-armhf@sha256:3a0ffeb305cdc6ef081dde81d86afee76102e74f76c0f7bd5685fc2457ec707b ... section_end:1734389601:step_script
section_start:1734389601:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1734389602:cleanup_file_variables
ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:4a4103f1a476d355d866b481ff96ac05a32a3a715cefcc1cbc1356a8959fb5f8: image not known (docker.go:650:0s)

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1331059

#2 lore raw

✗ i915.CI.BAT: failure for lib/igt_kmemleak: library to interact with kmemleak

In reply to Peter Senna Tschudin
== Series Details ==

== Series Details ==

Series: lib/igt_kmemleak: library to interact with kmemleak
URL : https://patchwork.freedesktop.org/series/142673/
State : failure

== Summary ==

CI Bug Log - changes from IGT_8157 -> IGTPW_12327
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_12327, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (45 -> 44)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live:
- bat-mtlp-8: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/bat-mtlp-8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-mtlp-8/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- fi-cfl-guc: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/fi-cfl-guc/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/fi-cfl-guc/igt@[email protected]

* igt@i915_selftest@live:
- bat-arls-5: NOTRUN -> [ABORT][5] ([i915#12061])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-arls-5/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-5: [PASS][6] -> [ABORT][7] ([i915#12061])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/bat-arls-5/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-arls-5/igt@i915_selftest@[email protected]
- bat-mtlp-8: [PASS][8] -> [ABORT][9] ([i915#12061])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/bat-mtlp-8/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-mtlp-8/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_mocs:
- bat-twl-2: [ABORT][10] ([i915#12919]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/bat-twl-2/igt@i915_selftest@live@gt_mocs.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-twl-2/igt@i915_selftest@live@gt_mocs.html

* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [ABORT][12] ([i915#12061]) -> [PASS][13] +1 other test pass
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8157/bat-mtlp-6/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12327/bat-mtlp-6/igt@i915_selftest@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12919]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12919
[i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982

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

* CI: CI-20190529 -> None
* IGT: IGT_8157 -> IGTPW_12327
* Linux: CI_DRM_15848 -> CI_DRM_15855

CI-20190529: 20190529
CI_DRM_15848: 63be16e210b1c3e43b43d8ca9b7e17f15142d2c3 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_15855: 8bfb48c045396305771aaea35f06d5ef3bf3a191 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_12327: 9f8406e86d1d9fdce5fea06e856390c7c968cb48 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8157: 48a70f6795e6d68b9fae275261ae3b09d3401fe1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

#3 lore raw

✓ Xe.CI.BAT: success for lib/igt_kmemleak: library to interact with kmemleak

In reply to Peter Senna Tschudin
== Series Details ==

== Series Details ==

Series: lib/igt_kmemleak: library to interact with kmemleak
URL : https://patchwork.freedesktop.org/series/142673/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_8157_BAT -> XEIGTPW_12327_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- bat-adlp-7: [PASS][1] -> [DMESG-WARN][2] ([Intel XE#3517]) +2 other tests dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/bat-adlp-7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/bat-adlp-7/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [PASS][3] -> [FAIL][4] ([Intel XE#1861])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/bat-adlp-7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/bat-adlp-7/igt@[email protected]

* igt@kms_psr@psr-cursor-plane-move:
- bat-adlp-7: [PASS][5] -> [SKIP][6] ([Intel XE#455]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/bat-adlp-7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/bat-adlp-7/igt@[email protected]

[Intel XE#1861]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1861
[Intel XE#3517]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3517
[Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455

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

* IGT: IGT_8157 -> IGTPW_12327
* Linux: xe-2380-63be16e210b1c3e43b43d8ca9b7e17f15142d2c3 -> xe-2386-49cc582754c205bbe43d4ef2b1fd3894bee1f3bd

IGTPW_12327: 9f8406e86d1d9fdce5fea06e856390c7c968cb48 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8157: 48a70f6795e6d68b9fae275261ae3b09d3401fe1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-2380-63be16e210b1c3e43b43d8ca9b7e17f15142d2c3: 63be16e210b1c3e43b43d8ca9b7e17f15142d2c3 xe-2386-49cc582754c205bbe43d4ef2b1fd3894bee1f3bd: 49cc582754c205bbe43d4ef2b1fd3894bee1f3bd

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/index.html

#4 lore raw

✗ Xe.CI.Full: failure for lib/igt_kmemleak: library to interact with kmemleak

In reply to Peter Senna Tschudin
== Series Details ==

== Series Details ==

Series: lib/igt_kmemleak: library to interact with kmemleak
URL : https://patchwork.freedesktop.org/series/142673/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_8157_full -> XEIGTPW_12327_full
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in XEIGTPW_12327_full, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

Participating hosts (4 -> 4)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_async_flips@crc-atomic@pipe-a-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [INCOMPLETE][1] +3 other tests incomplete
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@kms_async_flips@[email protected]

* igt@kms_flip@2x-flip-vs-suspend-interruptible@ac-dp2-hdmi-a3:
- shard-bmg: NOTRUN -> [INCOMPLETE][2]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@kms_flip@[email protected]

* igt@kms_flip@dpms-vs-vblank-race@a-hdmi-a6:
- shard-dg2-set2: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-433/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@c-dp2:
- shard-bmg: [PASS][5] -> [INCOMPLETE][6] +5 other tests incomplete
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@kms_flip@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@kms_flip@[email protected]

* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-bmg: [PASS][7] -> [FAIL][8] +3 other tests fail
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]

* igt@kms_psr@psr2-primary-blt@edp-1:
- shard-lnl: [PASS][9] -> [FAIL][10] +1 other test fail
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-5/igt@kms_psr@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@kms_psr@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@intel_hwmon@hwmon-write:
- shard-lnl: NOTRUN -> [SKIP][11] ([Intel XE#1125])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@[email protected]

* igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-hdmi-a-6-4-mc-ccs:
- shard-dg2-set2: NOTRUN -> [SKIP][12] ([Intel XE#2550]) +23 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@kms_async_flips@[email protected]

* igt@kms_async_flips@crc@pipe-a-dp-2:
- shard-bmg: NOTRUN -> [INCOMPLETE][13] ([Intel XE#3781]) +2 other tests incomplete
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_async_flips@[email protected]

* igt@kms_big_fb@4-tiled-32bpp-rotate-90:
- shard-bmg: NOTRUN -> [SKIP][14] ([Intel XE#2327]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- shard-lnl: NOTRUN -> [SKIP][15] ([Intel XE#3658])
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-8/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html

* igt@kms_big_fb@x-tiled-8bpp-rotate-90:
- shard-dg2-set2: NOTRUN -> [SKIP][16] ([Intel XE#316]) +3 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@kms_big_fb@yf-tiled-64bpp-rotate-180:
- shard-dg2-set2: NOTRUN -> [SKIP][17] ([Intel XE#1124]) +15 other tests skip
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_big_fb@yf-tiled-addfb-size-overflow:
- shard-bmg: NOTRUN -> [SKIP][18] ([Intel XE#610])
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][19] ([Intel XE#610])
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- shard-lnl: NOTRUN -> [SKIP][20] ([Intel XE#1124]) +2 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html

* igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180:
- shard-bmg: NOTRUN -> [SKIP][21] ([Intel XE#1124]) +8 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_bw@connected-linear-tiling-4-displays-2160x1440p:
- shard-dg2-set2: NOTRUN -> [SKIP][22] ([Intel XE#2191]) +1 other test skip
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_bw@linear-tiling-1-displays-2560x1440p:
- shard-bmg: NOTRUN -> [SKIP][23] ([Intel XE#367]) +2 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_bw@linear-tiling-3-displays-3840x2160p:
- shard-dg2-set2: NOTRUN -> [SKIP][24] ([Intel XE#367]) +4 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_ccs@bad-aux-stride-4-tiled-mtl-rc-ccs-cc:
- shard-bmg: NOTRUN -> [SKIP][25] ([Intel XE#2887]) +9 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_ccs@crc-primary-basic-4-tiled-lnl-ccs@pipe-b-dp-2:
- shard-bmg: NOTRUN -> [SKIP][26] ([Intel XE#2652] / [Intel XE#787]) +3 other tests skip
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-basic-4-tiled-mtl-rc-ccs@pipe-b-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [SKIP][27] ([Intel XE#787]) +139 other tests skip
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-lnl-ccs:
- shard-dg2-set2: NOTRUN -> [SKIP][28] ([Intel XE#3442])
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-mtl-rc-ccs-cc:
- shard-bmg: NOTRUN -> [SKIP][29] ([Intel XE#3432])
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-y-tiled-gen12-rc-ccs@pipe-d-dp-4:
- shard-dg2-set2: NOTRUN -> [SKIP][30] ([Intel XE#455] / [Intel XE#787]) +39 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@kms_ccs@[email protected]

* igt@kms_ccs@random-ccs-data-4-tiled-mtl-mc-ccs:
- shard-lnl: NOTRUN -> [SKIP][31] ([Intel XE#2887]) +2 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-8/igt@[email protected]

* igt@kms_cdclk@mode-transition:
- shard-bmg: NOTRUN -> [SKIP][32] ([Intel XE#2724])
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_cdclk@mode-transition@pipe-d-dp-4:
- shard-dg2-set2: NOTRUN -> [SKIP][33] ([Intel XE#314]) +3 other tests skip
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@kms_cdclk@[email protected]

* igt@kms_chamelium_color@ctm-green-to-red:
- shard-bmg: NOTRUN -> [SKIP][34] ([Intel XE#2325]) +1 other test skip
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][35] ([Intel XE#306]) +2 other tests skip
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_chamelium_color@ctm-limited-range:
- shard-lnl: NOTRUN -> [SKIP][36] ([Intel XE#306])
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@[email protected]

* igt@kms_chamelium_edid@hdmi-edid-change-during-hibernate:
- shard-bmg: NOTRUN -> [SKIP][37] ([Intel XE#2252]) +5 other tests skip
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_chamelium_frames@hdmi-cmp-planar-formats:
- shard-lnl: NOTRUN -> [SKIP][38] ([Intel XE#373])
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-7/igt@[email protected]

* igt@kms_chamelium_hpd@vga-hpd:
- shard-dg2-set2: NOTRUN -> [SKIP][39] ([Intel XE#373]) +11 other tests skip
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@kms_content_protection@atomic@pipe-a-dp-2:
- shard-bmg: NOTRUN -> [FAIL][40] ([Intel XE#1178]) +3 other tests fail
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@kms_content_protection@[email protected]

* igt@kms_content_protection@dp-mst-type-0:
- shard-bmg: NOTRUN -> [SKIP][41] ([Intel XE#2390])
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][42] ([Intel XE#307]) +1 other test skip
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@kms_content_protection@legacy:
- shard-dg2-set2: NOTRUN -> [FAIL][43] ([Intel XE#1178]) +1 other test fail
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@kms_content_protection@lic-type-0:
- shard-lnl: NOTRUN -> [SKIP][44] ([Intel XE#3278])
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@[email protected]

* igt@kms_cursor_crc@cursor-offscreen-512x512:
- shard-dg2-set2: NOTRUN -> [SKIP][45] ([Intel XE#308]) +2 other tests skip
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-512x170:
- shard-bmg: NOTRUN -> [SKIP][46] ([Intel XE#2321]) +2 other tests skip
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-max-size:
- shard-lnl: NOTRUN -> [SKIP][47] ([Intel XE#1424])
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-1/igt@[email protected]

* igt@kms_cursor_crc@cursor-rapid-movement-512x512:
- shard-lnl: NOTRUN -> [SKIP][48] ([Intel XE#2321])
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@[email protected]

* igt@kms_cursor_crc@cursor-rapid-movement-max-size:
- shard-bmg: NOTRUN -> [SKIP][49] ([Intel XE#2320]) +1 other test skip
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@kms_cursor_crc@cursor-suspend:
- shard-lnl: [PASS][50] -> [INCOMPLETE][51] ([Intel XE#1616]) +1 other test incomplete
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-2/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-8/igt@[email protected]

* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-bmg: NOTRUN -> [SKIP][52] ([Intel XE#2291]) +1 other test skip
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-lnl: NOTRUN -> [SKIP][53] ([Intel XE#309])
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-3/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions-varying-size:
- shard-bmg: [PASS][54] -> [DMESG-WARN][55] ([Intel XE#877])
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions-varying-size.html
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions-varying-size:
- shard-bmg: [PASS][56] -> [SKIP][57] ([Intel XE#2291]) +1 other test skip
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions-varying-size.html
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions:
- shard-dg2-set2: NOTRUN -> [SKIP][58] ([Intel XE#323])
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html

* igt@kms_display_modes@mst-extended-mode-negative:
- shard-bmg: NOTRUN -> [SKIP][59] ([Intel XE#2323])
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_fbcon_fbt@psr-suspend:
- shard-dg2-set2: NOTRUN -> [SKIP][60] ([Intel XE#776])
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@kms_feature_discovery@display-3x:
- shard-dg2-set2: NOTRUN -> [SKIP][61] ([Intel XE#703])
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@kms_feature_discovery@display-4x:
- shard-dg2-set2: NOTRUN -> [SKIP][62] ([Intel XE#1138])
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_flip@2x-absolute-wf_vblank:
- shard-bmg: [PASS][63] -> [SKIP][64] ([Intel XE#2316]) +1 other test skip
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@kms_flip@2x-absolute-wf_vblank.html
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@kms_flip@2x-absolute-wf_vblank.html

* igt@kms_flip@2x-flip-vs-expired-vblank@ad-hdmi-a6-dp4:
- shard-dg2-set2: [PASS][65] -> [FAIL][66] ([Intel XE#301]) +7 other tests fail
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-435/igt@kms_flip@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@kms_flip@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank@bc-dp2-hdmi-a3:
- shard-bmg: NOTRUN -> [FAIL][67] ([Intel XE#2882]) +1 other test fail
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_flip@[email protected]

* igt@kms_flip@2x-flip-vs-suspend-interruptible:
- shard-lnl: NOTRUN -> [SKIP][68] ([Intel XE#1421]) +3 other tests skip
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@[email protected]
- shard-bmg: NOTRUN -> [INCOMPLETE][69] ([Intel XE#2597])
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_flip@dpms-vs-vblank-race:
- shard-dg2-set2: [PASS][70] -> [INCOMPLETE][71] ([Intel XE#2049])
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-433/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-bmg: [PASS][72] -> [INCOMPLETE][73] ([Intel XE#2597]) +3 other tests incomplete
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling:
- shard-bmg: NOTRUN -> [SKIP][74] ([Intel XE#2293] / [Intel XE#2380]) +2 other tests skip
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode:
- shard-bmg: NOTRUN -> [SKIP][75] ([Intel XE#2293]) +2 other tests skip
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling:
- shard-lnl: NOTRUN -> [SKIP][76] ([Intel XE#1397] / [Intel XE#1745])
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling.html

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling@pipe-a-default-mode:
- shard-lnl: NOTRUN -> [SKIP][77] ([Intel XE#1397])
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tile-downscaling@pipe-a-default-mode.html

* igt@kms_frontbuffer_tracking@drrs-2p-primscrn-indfb-pgflip-blt:
- shard-bmg: NOTRUN -> [SKIP][78] ([Intel XE#2311]) +17 other tests skip
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-fullscreen:
- shard-dg2-set2: NOTRUN -> [SKIP][79] ([Intel XE#651]) +41 other tests skip
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-fullscreen.html

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-bmg: NOTRUN -> [FAIL][80] ([Intel XE#2333]) +8 other tests fail
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcdrrs-1p-primscrn-spr-indfb-fullscreen:
- shard-lnl: NOTRUN -> [SKIP][81] ([Intel XE#651]) +1 other test skip
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@kms_frontbuffer_tracking@fbcdrrs-1p-primscrn-spr-indfb-fullscreen.html

* igt@kms_frontbuffer_tracking@fbcdrrs-tiling-y:
- shard-dg2-set2: NOTRUN -> [SKIP][82] ([Intel XE#658])
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-onoff:
- shard-lnl: NOTRUN -> [SKIP][83] ([Intel XE#656]) +6 other tests skip
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-pgflip-blt:
- shard-bmg: NOTRUN -> [SKIP][84] ([Intel XE#2312]) +1 other test skip
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-pgflip-blt.html

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-plflip-blt:
- shard-bmg: NOTRUN -> [SKIP][85] ([Intel XE#2313]) +19 other tests skip
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-plflip-blt.html

* igt@kms_frontbuffer_tracking@fbcpsr-tiling-4:
- shard-dg2-set2: NOTRUN -> [SKIP][86] ([Intel XE#653]) +46 other tests skip
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@kms_getfb@getfb-reject-ccs:
- shard-dg2-set2: NOTRUN -> [SKIP][87] ([Intel XE#605])
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_getfb@getfb2-accept-ccs:
- shard-bmg: NOTRUN -> [SKIP][88] ([Intel XE#2340])
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_joiner@basic-big-joiner:
- shard-dg2-set2: NOTRUN -> [SKIP][89] ([Intel XE#346])
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_joiner@basic-ultra-joiner:
- shard-dg2-set2: NOTRUN -> [SKIP][90] ([Intel XE#2927])
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_joiner@invalid-modeset-force-ultra-joiner:
- shard-bmg: NOTRUN -> [SKIP][91] ([Intel XE#2934])
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
- shard-dg2-set2: NOTRUN -> [SKIP][92] ([Intel XE#356])
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@kms_panel_fitting@legacy:
- shard-bmg: NOTRUN -> [SKIP][93] ([Intel XE#2486])
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- shard-bmg: [PASS][94] -> [INCOMPLETE][95] ([Intel XE#3663])
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_plane_scaling@intel-max-src-size:
- shard-bmg: [PASS][96] -> [SKIP][97] ([Intel XE#2685] / [Intel XE#3307])
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_plane_scaling@plane-downscale-factor-0-25-with-pixel-format@pipe-b:
- shard-dg2-set2: NOTRUN -> [SKIP][98] ([Intel XE#2763]) +14 other tests skip
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@plane-downscale-factor-0-5-with-rotation@pipe-c:
- shard-lnl: NOTRUN -> [SKIP][99] ([Intel XE#2763]) +3 other tests skip
[99]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-25@pipe-d:
- shard-dg2-set2: NOTRUN -> [SKIP][100] ([Intel XE#2763] / [Intel XE#455]) +9 other tests skip
[100]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-75@pipe-a:
- shard-bmg: NOTRUN -> [SKIP][101] ([Intel XE#2763]) +14 other tests skip
[101]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_plane_scaling@[email protected]

* igt@kms_pm_backlight@fade-with-dpms:
- shard-bmg: NOTRUN -> [SKIP][102] ([Intel XE#870])
[102]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][103] ([Intel XE#870])
[103]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_pm_dc@dc5-psr:
- shard-lnl: [PASS][104] -> [FAIL][105] ([Intel XE#718])
[104]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-1/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@[email protected]

* igt@kms_pm_dc@dc5-retention-flops:
- shard-dg2-set2: NOTRUN -> [SKIP][106] ([Intel XE#3309])
[106]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@kms_pm_rpm@modeset-lpsp:
- shard-bmg: NOTRUN -> [SKIP][107] ([Intel XE#1439] / [Intel XE#3141] / [Intel XE#836])
[107]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_psr2_sf@fbc-pr-plane-move-sf-dmg-area:
- shard-dg2-set2: NOTRUN -> [SKIP][108] ([Intel XE#1489]) +12 other tests skip
[108]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_psr2_sf@fbc-psr2-overlay-plane-update-sf-dmg-area:
- shard-bmg: NOTRUN -> [SKIP][109] ([Intel XE#1489]) +3 other tests skip
[109]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_psr2_su@page_flip-nv12:
- shard-dg2-set2: NOTRUN -> [SKIP][110] ([Intel XE#1122]) +2 other tests skip
[110]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@kms_psr2_su@page_flip-nv12.html

* igt@kms_psr@pr-sprite-plane-move:
- shard-lnl: NOTRUN -> [SKIP][111] ([Intel XE#1406])
[111]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@[email protected]

* igt@kms_psr@psr-dpms:
- shard-dg2-set2: NOTRUN -> [SKIP][112] ([Intel XE#2850] / [Intel XE#929]) +21 other tests skip
[112]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@kms_psr@psr-primary-page-flip:
- shard-bmg: NOTRUN -> [SKIP][113] ([Intel XE#2234] / [Intel XE#2850]) +8 other tests skip
[113]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]

* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- shard-dg2-set2: NOTRUN -> [SKIP][114] ([Intel XE#2939])
[114]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@kms_rotation_crc@primary-rotation-90:
- shard-dg2-set2: NOTRUN -> [SKIP][115] ([Intel XE#3414]) +2 other tests skip
[115]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
- shard-lnl: NOTRUN -> [SKIP][116] ([Intel XE#1127])
[116]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@[email protected]

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-90:
- shard-bmg: NOTRUN -> [SKIP][117] ([Intel XE#3414])
[117]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_setmode@invalid-clone-single-crtc:
- shard-bmg: [PASS][118] -> [SKIP][119] ([Intel XE#1435])
[118]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[119]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_tiled_display@basic-test-pattern-with-chamelium:
- shard-dg2-set2: NOTRUN -> [SKIP][120] ([Intel XE#1500])
[120]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_vrr@cmrr:
- shard-dg2-set2: NOTRUN -> [SKIP][121] ([Intel XE#2168])
[121]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@kms_vrr@flipline:
- shard-dg2-set2: NOTRUN -> [SKIP][122] ([Intel XE#455]) +21 other tests skip
[122]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@kms_vrr@negative-basic:
- shard-bmg: NOTRUN -> [SKIP][123] ([Intel XE#1499])
[123]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_writeback@writeback-fb-id-xrgb2101010:
- shard-dg2-set2: NOTRUN -> [SKIP][124] ([Intel XE#756]) +1 other test skip
[124]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@xe_copy_basic@mem-copy-linear-0xfffe:
- shard-dg2-set2: NOTRUN -> [SKIP][125] ([Intel XE#1123])
[125]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@xe_copy_basic@mem-set-linear-0x3fff:
- shard-dg2-set2: NOTRUN -> [SKIP][126] ([Intel XE#1126]) +1 other test skip
[126]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@xe_eudebug@basic-connect:
- shard-lnl: NOTRUN -> [SKIP][127] ([Intel XE#2905]) +3 other tests skip
[127]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@[email protected]

* igt@xe_eudebug@basic-read-event:
- shard-bmg: NOTRUN -> [SKIP][128] ([Intel XE#2905]) +5 other tests skip
[128]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@xe_eudebug_online@interrupt-all-set-breakpoint:
- shard-dg2-set2: NOTRUN -> [SKIP][129] ([Intel XE#2905]) +12 other tests skip
[129]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@[email protected]

* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-dg2-set2: [PASS][130] -> [TIMEOUT][131] ([Intel XE#1473] / [Intel XE#402])
[130]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@xe_evict@evict-beng-threads-large:
- shard-bmg: NOTRUN -> [TIMEOUT][132] ([Intel XE#1473])
[132]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]

* igt@xe_evict@evict-large-multi-vm-cm:
- shard-dg2-set2: NOTRUN -> [FAIL][133] ([Intel XE#1600])
[133]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@xe_evict@evict-mixed-many-threads-small:
- shard-dg2-set2: [PASS][134] -> [TIMEOUT][135] ([Intel XE#1473])
[134]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@[email protected]
[135]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@xe_evict_ccs@evict-overcommit-standalone-nofree-samefd:
- shard-lnl: NOTRUN -> [SKIP][136] ([Intel XE#688]) +2 other tests skip
[136]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-7/igt@[email protected]

* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr-invalidate:
- shard-bmg: NOTRUN -> [SKIP][137] ([Intel XE#2322]) +6 other tests skip
[137]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr-invalidate.html

* igt@xe_exec_basic@multigpu-once-userptr-invalidate:
- shard-lnl: NOTRUN -> [SKIP][138] ([Intel XE#1392]) +1 other test skip
[138]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@[email protected]

* igt@xe_exec_fault_mode@twice-userptr-rebind-imm:
- shard-dg2-set2: NOTRUN -> [SKIP][139] ([Intel XE#288]) +33 other tests skip
[139]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@xe_exec_mix_modes@exec-simple-batch-store-dma-fence:
- shard-dg2-set2: NOTRUN -> [SKIP][140] ([Intel XE#2360]) +1 other test skip
[140]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-436/igt@[email protected]

* igt@xe_live_ktest@xe_bo:
- shard-bmg: [PASS][141] -> [SKIP][142] ([Intel XE#1192])
[141]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@xe_live_ktest@xe_bo.html
[142]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@xe_live_ktest@xe_bo.html

* igt@xe_live_ktest@xe_migrate:
- shard-lnl: [PASS][143] -> [SKIP][144] ([Intel XE#1192]) +2 other tests skip
[143]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-5/igt@xe_live_ktest@xe_migrate.html
[144]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-7/igt@xe_live_ktest@xe_migrate.html

* igt@xe_live_ktest@xe_mocs@xe_live_mocs_kernel_kunit:
- shard-dg2-set2: NOTRUN -> [FAIL][145] ([Intel XE#1999]) +2 other tests fail
[145]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@xe_live_ktest@xe_mocs@xe_live_mocs_kernel_kunit.html

* igt@xe_oa@closed-fd-and-unmapped-access:
- shard-dg2-set2: NOTRUN -> [SKIP][146] ([Intel XE#2541] / [Intel XE#3573]) +9 other tests skip
[146]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@xe_pat@pat-index-xehpc:
- shard-dg2-set2: NOTRUN -> [SKIP][147] ([Intel XE#2838] / [Intel XE#979])
[147]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@xe_pm@d3cold-mmap-vram:
- shard-dg2-set2: NOTRUN -> [SKIP][148] ([Intel XE#2284] / [Intel XE#366]) +1 other test skip
[148]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

* igt@xe_pm@s4-d3cold-basic-exec:
- shard-lnl: NOTRUN -> [SKIP][149] ([Intel XE#2284] / [Intel XE#366])
[149]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-8/igt@[email protected]
- shard-bmg: NOTRUN -> [SKIP][150] ([Intel XE#2284])
[150]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@xe_pm@s4-exec-after:
- shard-lnl: [PASS][151] -> [ABORT][152] ([Intel XE#1358] / [Intel XE#1607])
[151]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-8/igt@[email protected]
[152]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@[email protected]

* igt@xe_pm@s4-multiple-execs:
- shard-bmg: [PASS][153] -> [INCOMPLETE][154] ([Intel XE#1607])
[153]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[154]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@xe_pm_residency@toggle-gt-c6:
- shard-lnl: [PASS][155] -> [FAIL][156] ([Intel XE#958])
[155]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-1/igt@[email protected]
[156]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-8/igt@[email protected]

* igt@xe_query@multigpu-query-engines:
- shard-dg2-set2: NOTRUN -> [SKIP][157] ([Intel XE#944]) +2 other tests skip
[157]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@xe_wedged@wedged-at-any-timeout:
- shard-dg2-set2: NOTRUN -> [ABORT][158] ([Intel XE#3421])
[158]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@xe_wedged@wedged-mode-toggle:
- shard-dg2-set2: NOTRUN -> [ABORT][159] ([Intel XE#3075] / [Intel XE#3084])
[159]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-435/igt@[email protected]

#### Possible fixes ####

* igt@kms_async_flips@async-flip-with-page-flip-events@pipe-a-edp-1-linear:
- shard-lnl: [FAIL][160] ([Intel XE#911]) -> [PASS][161] +3 other tests pass
[160]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-6/igt@kms_async_flips@[email protected]
[161]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-6/igt@kms_async_flips@[email protected]

* igt@kms_bw@connected-linear-tiling-2-displays-2560x1440p:
- shard-bmg: [SKIP][162] ([Intel XE#2314] / [Intel XE#2894]) -> [PASS][163]
[162]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[163]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-64x64:
- shard-dg2-set2: [INCOMPLETE][164] -> [PASS][165] +1 other test pass
[164]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-435/igt@[email protected]
[165]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_cursor_legacy@cursora-vs-flipb-toggle:
- shard-bmg: [SKIP][166] ([Intel XE#2291]) -> [PASS][167]
[166]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[167]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]

* igt@kms_feature_discovery@display-2x:
- shard-bmg: [SKIP][168] ([Intel XE#2373]) -> [PASS][169]
[168]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[169]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a6-dp4:
- shard-dg2-set2: [FAIL][170] ([Intel XE#3321]) -> [PASS][171]
[170]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-433/igt@kms_flip@[email protected]
[171]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@kms_flip@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ad-hdmi-a6-dp4:
- shard-dg2-set2: [FAIL][172] ([Intel XE#301]) -> [PASS][173] +1 other test pass
[172]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-433/igt@kms_flip@[email protected]
[173]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@kms_flip@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bd-dp2-hdmi-a3:
- shard-bmg: [FAIL][174] ([Intel XE#3321]) -> [PASS][175] +4 other tests pass
[174]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@kms_flip@[email protected]
[175]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@kms_flip@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate:
- shard-bmg: [FAIL][176] ([Intel XE#2882]) -> [PASS][177] +3 other tests pass
[176]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[177]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
- shard-dg2-set2: [FAIL][178] ([Intel XE#886]) -> [PASS][179] +1 other test pass
[178]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@[email protected]
[179]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate@bc-hdmi-a6-dp4:
- shard-dg2-set2: [FAIL][180] -> [PASS][181] +2 other tests pass
[180]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@kms_flip@[email protected]
[181]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@kms_flip@[email protected]

* igt@kms_flip@2x-wf_vblank-ts-check-interruptible:
- shard-bmg: [SKIP][182] ([Intel XE#2316]) -> [PASS][183] +5 other tests pass
[182]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@kms_flip@2x-wf_vblank-ts-check-interruptible.html
[183]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@kms_flip@2x-wf_vblank-ts-check-interruptible.html

* igt@kms_flip@flip-vs-suspend:
- shard-dg2-set2: [INCOMPLETE][184] ([Intel XE#2049] / [Intel XE#2597]) -> [PASS][185]
[184]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-434/igt@[email protected]
[185]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@[email protected]

* igt@kms_flip@flip-vs-suspend@d-dp4:
- shard-dg2-set2: [INCOMPLETE][186] ([Intel XE#2049]) -> [PASS][187]
[186]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-434/igt@kms_flip@[email protected]
[187]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-433/igt@kms_flip@[email protected]

* igt@kms_hdr@invalid-hdr:
- shard-bmg: [SKIP][188] ([Intel XE#1503]) -> [PASS][189]
[188]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[189]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@kms_joiner@invalid-modeset-force-big-joiner:
- shard-bmg: [SKIP][190] ([Intel XE#3012]) -> [PASS][191] +1 other test pass
[190]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[191]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@kms_setmode@basic@pipe-a-hdmi-a-6:
- shard-dg2-set2: [FAIL][192] ([Intel XE#2883]) -> [PASS][193] +6 other tests pass
[192]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@kms_setmode@[email protected]
[193]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-463/igt@kms_setmode@[email protected]

* igt@kms_setmode@basic@pipe-b-edp-1:
- shard-lnl: [FAIL][194] ([Intel XE#2883]) -> [PASS][195] +1 other test pass
[194]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-1/igt@kms_setmode@[email protected]
[195]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-2/igt@kms_setmode@[email protected]

* igt@kms_vrr@cmrr@pipe-a-edp-1:
- shard-lnl: [FAIL][196] ([Intel XE#2159]) -> [PASS][197] +1 other test pass
[196]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-7/igt@kms_vrr@[email protected]
[197]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-5/igt@kms_vrr@[email protected]

* igt@xe_exec_basic@many-basic:
- shard-bmg: [INCOMPLETE][198] -> [PASS][199]
[198]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[199]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

* igt@xe_module_load@load:
- shard-bmg: ([PASS][200], [PASS][201], [PASS][202], [PASS][203], [PASS][204], [PASS][205], [PASS][206], [PASS][207], [PASS][208], [PASS][209], [PASS][210], [PASS][211], [PASS][212], [PASS][213], [PASS][214], [PASS][215], [PASS][216], [PASS][217], [PASS][218], [PASS][219], [PASS][220], [PASS][221], [SKIP][222]) ([Intel XE#2457]) -> ([PASS][223], [PASS][224], [PASS][225], [PASS][226], [PASS][227], [PASS][228], [PASS][229], [PASS][230], [PASS][231], [PASS][232], [PASS][233], [PASS][234], [PASS][235], [PASS][236], [PASS][237], [PASS][238], [PASS][239], [PASS][240], [PASS][241], [PASS][242], [PASS][243], [PASS][244], [PASS][245], [PASS][246], [PASS][247])
[200]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[201]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[202]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[203]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[204]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[205]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[206]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[207]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[208]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[209]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[210]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[211]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[212]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[213]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[214]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[215]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[216]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[217]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[218]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-4/igt@[email protected]
[219]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[220]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[221]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[222]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[223]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
[224]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[225]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[226]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]
[227]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]
[228]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[229]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[230]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]
[231]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]
[232]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]
[233]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[234]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]
[235]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]
[236]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]
[237]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@[email protected]
[238]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]
[239]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]
[240]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-7/igt@[email protected]
[241]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
[242]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
[243]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
[244]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]
[245]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]
[246]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]
[247]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@[email protected]

#### Warnings ####

* igt@kms_content_protection@legacy:
- shard-bmg: [SKIP][248] ([Intel XE#2341]) -> [FAIL][249] ([Intel XE#1178]) +1 other test fail
[248]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@[email protected]
[249]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@kms_content_protection@srm:
- shard-bmg: [FAIL][250] ([Intel XE#1178]) -> [SKIP][251] ([Intel XE#2341])
[250]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-2/igt@[email protected]
[251]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_flip@bo-too-big-interruptible@a-edp1:
- shard-lnl: [TIMEOUT][252] ([Intel XE#1504]) -> [INCOMPLETE][253] ([Intel XE#1504]) +1 other test incomplete
[252]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-6/igt@kms_flip@[email protected]
[253]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-7/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@drrs-2p-primscrn-cur-indfb-draw-render:
- shard-bmg: [SKIP][254] ([Intel XE#2312]) -> [SKIP][255] ([Intel XE#2311]) +12 other tests skip
[254]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-cur-indfb-draw-render.html
[255]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-8/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-cur-indfb-draw-render.html

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-wc:
- shard-bmg: [SKIP][256] ([Intel XE#2312]) -> [FAIL][257] ([Intel XE#2333]) +5 other tests fail
[256]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-wc.html
[257]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen:
- shard-bmg: [FAIL][258] ([Intel XE#2333]) -> [SKIP][259] ([Intel XE#2312]) +2 other tests skip
[258]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html
[259]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html

* igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-cur-indfb-move:
- shard-bmg: [SKIP][260] ([Intel XE#2311]) -> [SKIP][261] ([Intel XE#2312]) +6 other tests skip
[260]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@[email protected]
[261]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-pgflip-blt:
- shard-bmg: [SKIP][262] ([Intel XE#2312]) -> [SKIP][263] ([Intel XE#2313]) +15 other tests skip
[262]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-pgflip-blt.html
[263]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-pgflip-blt.html

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-onoff:
- shard-bmg: [SKIP][264] ([Intel XE#2313]) -> [SKIP][265] ([Intel XE#2312]) +4 other tests skip
[264]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[265]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@kms_plane_scaling@intel-max-src-size:
- shard-dg2-set2: [FAIL][266] ([Intel XE#361]) -> [SKIP][267] ([Intel XE#455])
[266]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-436/igt@[email protected]
[267]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-464/igt@[email protected]

* igt@kms_tiled_display@basic-test-pattern:
- shard-dg2-set2: [SKIP][268] ([Intel XE#362]) -> [FAIL][269] ([Intel XE#1729])
[268]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-dg2-463/igt@[email protected]
[269]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-dg2-434/igt@[email protected]

* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-bmg: [TIMEOUT][270] ([Intel XE#1473]) -> [INCOMPLETE][271] ([Intel XE#1473])
[270]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-7/igt@[email protected]
[271]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

* igt@xe_evict@evict-mixed-many-threads-small:
- shard-bmg: [TIMEOUT][272] ([Intel XE#1473] / [Intel XE#2472]) -> [INCOMPLETE][273] ([Intel XE#1473]) +1 other test incomplete
[272]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[273]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-6/igt@[email protected]

* igt@xe_evict@evict-mixed-threads-large:
- shard-bmg: [FAIL][274] ([Intel XE#1000]) -> [INCOMPLETE][275] ([Intel XE#1473])
[274]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[275]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@[email protected]

* igt@xe_live_ktest@xe_eudebug:
- shard-bmg: [SKIP][276] ([Intel XE#2833]) -> [SKIP][277] ([Intel XE#1192])
[276]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-8/igt@xe_live_ktest@xe_eudebug.html
[277]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-4/igt@xe_live_ktest@xe_eudebug.html
- shard-lnl: [SKIP][278] ([Intel XE#2833]) -> [SKIP][279] ([Intel XE#1192] / [Intel XE#3026])
[278]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-lnl-8/igt@xe_live_ktest@xe_eudebug.html
[279]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-lnl-7/igt@xe_live_ktest@xe_eudebug.html

* igt@xe_wedged@wedged-at-any-timeout:
- shard-bmg: [SKIP][280] ([Intel XE#1130]) -> [ABORT][281] ([Intel XE#3765])
[280]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8157/shard-bmg-5/igt@[email protected]
[281]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/shard-bmg-3/igt@[email protected]

[Intel XE#1000]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1000
[Intel XE#1122]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1122
[Intel XE#1123]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1123
[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1125]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1125
[Intel XE#1126]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1126
[Intel XE#1127]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1127
[Intel XE#1130]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1130
[Intel XE#1138]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1138
[Intel XE#1178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1178
[Intel XE#1192]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1192
[Intel XE#1358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1358
[Intel XE#1392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1392
[Intel XE#1397]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1397
[Intel XE#1406]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1406
[Intel XE#1421]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1421
[Intel XE#1424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1424
[Intel XE#1435]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1435
[Intel XE#1439]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1439
[Intel XE#1473]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1473
[Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
[Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
[Intel XE#1500]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1500
[Intel XE#1503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1503
[Intel XE#1504]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1504
[Intel XE#1600]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1600
[Intel XE#1607]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1607
[Intel XE#1616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1616
[Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
[Intel XE#1745]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1745
[Intel XE#1999]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1999
[Intel XE#2049]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2049
[Intel XE#2159]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2159
[Intel XE#2168]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2168
[Intel XE#2191]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2191
[Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
[Intel XE#2252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2252
[Intel XE#2284]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2284
[Intel XE#2291]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2291
[Intel XE#2293]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2293
[Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
[Intel XE#2312]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2312
[Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
[Intel XE#2314]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2314
[Intel XE#2316]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2316
[Intel XE#2320]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2320
[Intel XE#2321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2321
[Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
[Intel XE#2323]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2323
[Intel XE#2325]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2325
[Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
[Intel XE#2333]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2333
[Intel XE#2340]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2340
[Intel XE#2341]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2341
[Intel XE#2360]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2360
[Intel XE#2373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2373
[Intel XE#2380]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2380
[Intel XE#2390]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2390
[Intel XE#2457]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2457
[Intel XE#2472]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2472
[Intel XE#2486]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2486
[Intel XE#2541]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2541
[Intel XE#2550]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2550
[Intel XE#2597]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2597
[Intel XE#2652]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2652
[Intel XE#2685]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2685
[Intel XE#2724]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2724
[Intel XE#2763]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2763
[Intel XE#2833]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2833
[Intel XE#2838]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2838
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#2882]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2882
[Intel XE#2883]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2883
[Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
[Intel XE#2894]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2894
[Intel XE#2905]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2905
[Intel XE#2927]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2927
[Intel XE#2934]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2934
[Intel XE#2939]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2939
[Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
[Intel XE#3012]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3012
[Intel XE#3026]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3026
[Intel XE#306]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/306
[Intel XE#307]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/307
[Intel XE#3075]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3075
[Intel XE#308]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/308
[Intel XE#3084]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3084
[Intel XE#309]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/309
[Intel XE#314]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/314
[Intel XE#3141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3141
[Intel XE#316]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/316
[Intel XE#323]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/323
[Intel XE#3278]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3278
[Intel XE#3307]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3307
[Intel XE#3309]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3309
[Intel XE#3321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3321
[Intel XE#3414]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3414
[Intel XE#3421]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3421
[Intel XE#3432]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3432
[Intel XE#3442]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3442
[Intel XE#346]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/346
[Intel XE#356]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/356
[Intel XE#3573]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3573
[Intel XE#361]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/361
[Intel XE#362]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/362
[Intel XE#3658]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3658
[Intel XE#366]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/366
[Intel XE#3663]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3663
[Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
[Intel XE#373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/373
[Intel XE#3765]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3765
[Intel XE#3781]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3781
[Intel XE#402]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/402
[Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455
[Intel XE#605]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/605
[Intel XE#610]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/610
[Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
[Intel XE#653]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/653
[Intel XE#656]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/656
[Intel XE#658]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/658
[Intel XE#688]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/688
[Intel XE#703]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/703
[Intel XE#718]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/718
[Intel XE#756]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/756
[Intel XE#776]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/776
[Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
[Intel XE#836]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/836
[Intel XE#870]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/870
[Intel XE#877]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/877
[Intel XE#886]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/886
[Intel XE#911]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/911
[Intel XE#929]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/929
[Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944
[Intel XE#958]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/958
[Intel XE#979]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/979

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

* IGT: IGT_8157 -> IGTPW_12327
* Linux: xe-2380-63be16e210b1c3e43b43d8ca9b7e17f15142d2c3 -> xe-2386-49cc582754c205bbe43d4ef2b1fd3894bee1f3bd

IGTPW_12327: 9f8406e86d1d9fdce5fea06e856390c7c968cb48 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8157: 48a70f6795e6d68b9fae275261ae3b09d3401fe1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-2380-63be16e210b1c3e43b43d8ca9b7e17f15142d2c3: 63be16e210b1c3e43b43d8ca9b7e17f15142d2c3 xe-2386-49cc582754c205bbe43d4ef2b1fd3894bee1f3bd: 49cc582754c205bbe43d4ef2b1fd3894bee1f3bd

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12327/index.html

#5 lore raw
In reply to Peter Senna Tschudin

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of Peter Senna Tschudin
Sent: Monday, December 16, 2024 10:47 AM
To: [email protected]
Cc: Senna, Peter <[email protected]>; Gandi, Ramadevi <[email protected]>; Knop, Ryszard <[email protected]>; Lattannavar, Sameer <[email protected]>; De Marchi, Lucas <[email protected]>; Saarinen, Jani <[email protected]>; Piecielska, Katarzyna <[email protected]>; Roper, Matthew D <[email protected]>; [email protected]; Taylor, Clinton A <[email protected]>; Vivekanandan, Balasubramani <[email protected]>; Yu, Jianshui <[email protected]>; Peter Senna Tschudin <[email protected]>
Subject: [PATCH RFC i-g-t] lib/igt_kmemleak: library to interact with kmemleak

Quoted 15 lines

From: Peter Senna Tschudin <[email protected]>

Adds a simple library for interacting with kmemleak ispired by 'tests/amdgpu/amd_mem_leak.c'. Also adds unit testing for the library.

To use the library include "igt_kmemleak.h" and:
1. igt_kmemleak_init(NULL) /* Returns true if kmemleak is active */
2. igt_kmemleak_clear()
3. /* Run your test */
4. igt_kmemleak_scan()
5. if (igt_kmemleak_found_leaks()) igt_kmemleak_cp_leaks_file(*dst)

Quoted 12 lines

I'm not particularly well-versed in kmemleak, but nothing about this patch seems out of the ordinary. Though I can still offer some small style-related suggestions.
Also, do you want a reviewed-by for this? I'd give one right now but I don't think I should be Acking RFC patches.

Quoted 74 lines
---
 lib/igt_kmemleak.c       | 154 +++++++++++++++++++++
 lib/igt_kmemleak.h       |  69 ++++++++++
 lib/meson.build          |   1 +
 lib/tests/igt_kmemleak.c | 291 +++++++++++++++++++++++++++++++++++++++
 lib/tests/meson.build    |   1 +
 5 files changed, 516 insertions(+)
 create mode 100644 lib/igt_kmemleak.c
 create mode 100644 lib/igt_kmemleak.h
 create mode 100644 lib/tests/igt_kmemleak.c
lib/igt_kmemleak.c new file +57 -0
new file mode 100644
index 000000000..02ee0361d
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <libudev.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "igt_core.h"
+#include "igt_device_scan.h"
+#include "igt_kmemleak.h"
+#include "igt_kmod.h"
+#include "igt_list.h"
+
+/* We can change the path for unit testing, see igt_kmemleak_init() */
+static char igt_kmemleak_file[256] = "/sys/kernel/debug/kmemleak";
+
+/**
+ * igt_kmemeak_init:
+ * @igt_kmemleak_file: update the path to kmemleak file to enable unit testing
+ *
+ * Check if kmemleak is enabled in the kernel, if debugfs is mounted and
+ * if kmemleak file is present and readable.
+ *
+ * Returns: true if kmemleak is enabled, false otherwise.
+ */
+bool igt_kmemleak_init(const char *unit_test_kmemleak_file)
+{
+	FILE *fp;
+
+	if (unit_test_kmemleak_file)
+		snprintf(igt_kmemleak_file,
+			 sizeof(igt_kmemleak_file),
+			 "%s",
+			 unit_test_kmemleak_file);
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cmd:
+ * @cmd: command to send to kmemleak
+ *
+ * Send a command to kmemleak.
+ *
+ * Returns: true if sending the command was successful, false otherwise.
+ */
+bool igt_kmemleak_cmd(const char *cmd)
+{

lib/igt_kmemleak.c line 67

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	FILE *fp;
+
+	fp = fopen(igt_kmemleak_file, "r+");
+	if (!fp)
+		return false;
+
+	if (fwrite(cmd, 1, strlen(cmd), fp) != strlen(cmd)) {
+		fclose(fp);
+		return false;
+	}

Maybe we can reduce the number of fclose calls by capturing the fwrite return value:
"""
bool igt_kmemleak_cmd(const char *cmd)

{
	FILE *fp;
	size_t wlen;

	fp = fopen(igt_kmemleak_file, "r+");
	if (!fp)
		return false;

	wlen = fwrite(cmd, 1, strlen(cmd), fp);
	fclose(fp);

	return wlen == strlen(cmd);
}

"""
Though that's not strictly necessary here.

Quoted 40 lines
lib/igt_kmemleak.c new file +40 -0
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_scan:
+ *
+ * Trigger an immediate scan on kmemleak.
+ *
+ * Returns: true if sending the command to scan was successful, false otherwise.
+ */
+bool igt_kmemleak_scan(void)
+{
+	return igt_kmemleak_cmd("scan");
+}
+
+/**
+ * igt_kmemeak_clear:
+ *
+ * Trigger an immediate clear on kmemleak.
+ *
+ * Returns: true if sending the command to clear was successful, false
+ * otherwise.
+ */
+bool igt_kmemleak_clear(void)
+{
+	return igt_kmemleak_cmd("clear");
+}
+
+/**
+ * igt_kmemeak_found_leaks:
+ *
+ * Check if kmemleak found any leaks.
+ *
+ * Returns: true if kmemleak found any leaks, false otherwise.
+ */
+bool igt_kmemleak_found_leaks(void)
+{
+	FILE *fp;

lib/igt_kmemleak.c line 117

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	char buf[1];
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	if (fread(buf, 1, 1, fp) <= 0) {
+		fclose(fp);
+		return false;
+	}

Same comment as with igt_kmemleak_cmd above:
"""
bool igt_kmemleak_found_leak(void)

{
	FILE *fp;
	char buf[1];
	size_t rlen;

	fp = fopen(igt_kmemleak_file, "r");
	if (!fp)
		return false;

	rlen = fread(buf, 1, 1, fp);
	fclose(fp);

	return rlen > 0;
}

"""
Though, again, this isn't strictly necessary.

Quoted 25 lines
lib/igt_kmemleak.c new file +25 -0
+
+	/* fread() did read 1 char */
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cp_leaks_file:
+ * @dst: path of destination file including the file name
+ *
+ * Copy kmemleak file to dst.
+ *
+ * Returns: true if copy was successful, false otherwise
+ */
+bool igt_kmemleak_cp_leaks_file(const char *dst)
+{
+	FILE *src, *dest;
+	char buf[1024];
+	size_t n;
+
+	src = fopen(igt_kmemleak_file, "r");
+	if (!src)
+		return false;
+
+	dest = fopen(dst, "w");

lib/igt_kmemleak.c line 152

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	if (!dest) {
+		fclose(src);
+		return false;
+	}
+
+	while ((n = fread(buf, 1, sizeof(buf), src)) > 0)
+		fwrite(buf, 1, n, dest);
+
+	fclose(src);
+	fclose(dest);

I think these two fclose calls should swap places for style reasons, but it's also not particularly important.

Quoted 16 lines
lib/igt_kmemleak.c new file +2 -0
+	return true;
+}
lib/igt_kmemleak.h new file +8 -0
new file mode 100644
index 000000000..a65f31810
@@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: MIT
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef IGT_KMEMLEAK_H
+#define IGT_KMEMLEAK_H
+
+#include <stdbool.h>

lib/igt_kmemleak.h line 18

Quoted 10 lines
lib/igt_kmemleak.h new file +10 -0
+
+/**
+ * igt_kmemeak_init:
+ * @igt_kmemleak_file: update the path to kmemleak file to enable unit testing
+ *
+ * Check if kmemleak is enabled in the kernel, if debugfs is mounted and
+ * if kmemleak file is present and readable.
+ *
+ * Returns: true if kmemleak is enabled, false otherwise.
+ */

I don't think we need comments like this for both the implementation and the header file. The former should be sufficient.

Quoted 342 lines
lib/igt_kmemleak.h new file +51 -0
+bool igt_kmemleak_init(const char *unit_test_kmemleak_file);
+
+/**
+ * igt_kmemeak_cmd:
+ * @cmd: command to send to kmemleak
+ *
+ * Send a command to kmemleak.
+ *
+ * Returns: true if sending the command was successful, false otherwise.
+ */
+bool igt_kmemleak_cmd(const char *cmd);
+
+/**
+ * igt_kmemeak_scan:
+ *
+ * Trigger an immediate scan on kmemleak.
+ *
+ * Returns: true if sending the command to scan was successful, false otherwise.
+ */
+bool igt_kmemleak_scan(void);
+
+/**
+ * igt_kmemeak_clear:
+ *
+ * Trigger an immediate clear on kmemleak.
+ *
+ * Returns: true if sending the command to clear was successful, false
+ * otherwise.
+ */
+bool igt_kmemleak_clear(void);
+
+/**
+ * igt_kmemeak_found_leaks:
+ *
+ * Check if kmemleak found any leaks.
+ *
+ * Returns: true if kmemleak found any leaks, false otherwise.
+ */
+bool igt_kmemleak_found_leaks(void);
+
+/**
+ * igt_kmemeak_cp_leaks_file:
+ * @dst: path of destination file including the file name
+ *
+ * Copy kmemleak file to dst.
+ *
+ * Returns: true if copy was successful, false otherwise
+ */
+bool igt_kmemleak_cp_leaks_file(const char *dst);
+
+#endif /* IGT_KMEMLEAK_H */
lib/meson.build +1 -0
index 640513e6c..24423ef37 100644
@@ -96,6 +96,7 @@ lib_sources = [
 	'igt_dummyload.c',
 	'igt_store.c',
 	'uwildmat/uwildmat.c',
+	'igt_kmemleak.c',
 	'igt_kmod.c',
 	'igt_ktap.c',
 	'igt_panfrost.c',
lib/tests/igt_kmemleak.c new file +273 -0
new file mode 100644
index 000000000..f5bf5ca07
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <zlib.h>
+
+#include "igt_core.h"
+#include "igt_kmemleak.h"
+
+const char *kmemleak_file_example =
+"unreferenced object 0xffff888102a2e638 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   00 00 00 00 00 00 00 00 0d 01 a2 00 00 00 00 00  ................\n"
+"   f0 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc 2df71a7e):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2ed18 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   38 e6 a2 02 81 88 ff ff 0d 11 2d 00 00 00 00 00  8.........-.....\n"
+"   f2 7c 03 00 00 c9 ff ff 58 ea a2 02 81 88 ff ff  .|......X.......\n"
+" backtrace (crc ec2a8bdc):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2ea58 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   38 e6 a2 02 81 88 ff ff 0d 01 a0 00 00 00 00 00  8...............\n"
+"   f6 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc f911c0d1):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e428 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   58 ea a2 02 81 88 ff ff 0d 01 35 00 00 00 00 00  X.........5.....\n"
+"   fc 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc cb8aaffd):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e008 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   28 e4 a2 02 81 88 ff ff 0d 01 2d 00 00 00 00 00  (.........-.....\n"
+"   fc 7c 03 00 00 c9 ff ff c8 e2 a2 02 81 88 ff ff  .|..............\n"
+" backtrace (crc 7f883e78):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2b9e5>] acpi_ps_get_next_namepath+0x1f5/0x390\n"
+"   [<ffffffff81c2cc15>] acpi_ps_parse_loop+0x4a5/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e2c8 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   28 e4 a2 02 81 88 ff ff 0d 01 73 00 00 00 00 00  (.........s.....\n"
+"   00 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc 338c016):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e378 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   c8 e2 a2 02 81 88 ff ff 0d 01 0d 00 00 00 00 00  ................\n"
+"   01 7d 03 00 00 c9 ff ff 98 e7 a2 02 81 88 ff ff  .}..............\n"
+" backtrace (crc 665fb8a7):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e798 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   7c8 e2 a2 02 81 88 ff ff 0d 01 98 00 00 00 00 00  ................\n"
+"   1b 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc b7a23a1c):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e0b8 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   98 e7 a2 02 81 88 ff ff 0d 01 2d 00 00 00 00 00  ..........-.....\n"
+"   1c 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc 14d67a9c):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170\n";
+
+static unsigned long crc32_file(int fd)
+{
+	unsigned long crc;
+	char buf[1024];
+	ssize_t n;
+
+	crc = crc32(0, Z_NULL, 0);
+	while ((n = read(fd, buf, sizeof(buf))) > 0)
+		crc = crc32(crc, (const Bytef *)buf, n);
+
+	return crc;
+}
+
+static void test_igt_kmemleak_cp_leaks_file(void)
+{
+	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
+	int fd;
+	unsigned long crc;
+
+	fd = mkstemp(dst_file_path);
+	close(fd);
+
+	igt_assert(igt_kmemleak_cp_leaks_file(dst_file_path));
+
+	/* Test that both files have the same size */
+	fd = open(dst_file_path, O_RDONLY);
+	igt_assert(fd >= 0);
+	igt_assert(lseek(fd, 0, SEEK_END) == strlen(kmemleak_file_example));
+	close(fd);
+
+	/* Test that both files have the same content */
+	crc = crc32(0, Z_NULL, 0);
+	crc = crc32(crc,
+		    (const Bytef *)kmemleak_file_example,
+		    strlen(kmemleak_file_example));
+
+	fd = open(dst_file_path, O_RDONLY);
+	igt_assert(fd >= 0);
+	igt_info(" dst_file: %s\n", dst_file_path);
+	close(fd);
+}
+
+static void test_empty_file(void)
+{
+	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
+	int fd;
+
+	fd = mkstemp(tmp_file_path);
+	igt_assert(fd >= 0);
+	close(fd);
+
+	/* Set the path for the unit testing file */
+	igt_assert(igt_kmemleak_init(tmp_file_path));
+	igt_assert(!igt_kmemleak_found_leaks());
+}
+
+static void test_non_empty_file(void)
+{
+	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
+	int fd;

lib/tests/igt_kmemleak.c line 283

Quoted 10 lines
lib/tests/igt_kmemleak.c new file +10 -0
+
+	fd = mkstemp(tmp_file_path);
+	igt_assert(fd >= 0);
+	write(fd, kmemleak_file_example, strlen(kmemleak_file_example));
+
+	/* Set the path for the unit testing file */
+	igt_assert(igt_kmemleak_init(tmp_file_path));
+
+	/* Test igt_kmemleak_found_leaks() that should return true */
+	igt_assert(igt_kmemleak_found_leaks());

test_empty_file and test_non_empty_file could probably be consolidated into a single "test_file" or "test_kmemleak_file" test with a Boolean determining if we want to write to the test file or not:
"""
static void test_kmemleak_file(bool write)

{
	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
	int fd = mkstemp(tmp_file_path);
	igt_assert(fd >= 0);

	if (write)
		write(fd, kmemleak_file_example, strlen(kmemleak_file_example));

	/* Set the path for the unit testing file */
	igt_assert(igt_kmemleak_init(tmp_file_path));
	
	/* Test igt_kmemleak_found_leaks() returns true if written */
	igt_assert(igt_kmemleak_found_leaks() == write);

	close(fd);
}
...
igt_simple_main
{
	test_kmemleak_file(false);
	test_kmemleak_file(true);
	test_igt_kmemleak_cp_leaks_file();
}

"""

lib/tests/igt_kmemleak.c line 290

Quoted 7 lines
lib/tests/igt_kmemleak.c new file +7 -0
+}
+
+igt_simple_main
+{
+	test_empty_file();
+	test_non_empty_file();
+	test_igt_kmemleak_cp_leaks_file();

It might be better to separate these out into their own subtests:
"""

	igt_subtest_f("empty-file")
		test_empty_file();
	igt_subtest_f("non-empty-file")
		test_non_empty_file();
	igt_subtest_f("cp-leaks-file")
		test_igt_kmemleak_cp_leaks_file();

"""

Though looking at it a bit closer, I see that test_igt_kmemleak_cp_leaks_file depends on the completion of test_non_empty_file to run properly? Maybe we should separate the test out into chunks?

Let me try prototyping it here:
"""
--- Original file up to end of crc32_file function is unchanged ---

static void init_kmemleak_file(bool write)
{
--- Same as test_kmemleak_file from earlier suggestion --- }

static void test_kmemleak_cp_leaks_file(void)

{
	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
	int fd;
	unsigned long crc;

	init_kmemleak_file(true);

	fd = mkstemp(dst_file_path);

--- Rest of test is unchanged after this point --- }

igt_main

{
	igt_subtest_f("empty")
		init_kmemleak_file(false);
	igt_subtest_f("non-empty")
		init_kmemleak_file(true);
	igt_subtest_f("cp-leaks-file")
		test_kmemleak_cp_leaks_file();
}

"""

-Jonathan Cavitt

Quoted 17 lines
lib/tests/igt_kmemleak.c new file +1 -0
+}
lib/tests/meson.build +1 -0
index df8092638..bcbea9ba4 100644
@@ -15,6 +15,7 @@ lib_tests = [
         'igt_ktap_parser',
 	'igt_list_only',
 	'igt_invalid_subtest_name',
+	'igt_kmemleak',
 	'igt_nesting',
 	'igt_no_exit',
 	'igt_runnercomms_packets',
Signature · 1 line
2.34.1
#6 lore raw
Quoted 592 lines · Jonathan

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of Peter Senna Tschudin
Sent: Monday, December 16, 2024 10:47 AM
To: [email protected]
Cc: Senna, Peter <[email protected]>; Gandi, Ramadevi <[email protected]>; Knop, Ryszard <[email protected]>; Lattannavar, Sameer <[email protected]>; De Marchi, Lucas <[email protected]>; Saarinen, Jani <[email protected]>; Piecielska, Katarzyna <[email protected]>; Roper, Matthew D <[email protected]>; [email protected]; Taylor, Clinton A <[email protected]>; Vivekanandan, Balasubramani <[email protected]>; Yu, Jianshui <[email protected]>; Peter Senna Tschudin <[email protected]>
Subject: [PATCH RFC i-g-t] lib/igt_kmemleak: library to interact with kmemleak

Quoted 15 lines

From: Peter Senna Tschudin <[email protected]>

Adds a simple library for interacting with kmemleak ispired by 'tests/amdgpu/amd_mem_leak.c'. Also adds unit testing for the library.

To use the library include "igt_kmemleak.h" and:
1. igt_kmemleak_init(NULL) /* Returns true if kmemleak is active */
2. igt_kmemleak_clear()
3. /* Run your test */
4. igt_kmemleak_scan()
5. if (igt_kmemleak_found_leaks()) igt_kmemleak_cp_leaks_file(*dst)

Quoted 12 lines

I'm not particularly well-versed in kmemleak, but nothing about this patch seems out of the ordinary. Though I can still offer some small style-related suggestions.
Also, do you want a reviewed-by for this? I'd give one right now but I don't think I should be Acking RFC patches.

Quoted 74 lines
---
 lib/igt_kmemleak.c       | 154 +++++++++++++++++++++
 lib/igt_kmemleak.h       |  69 ++++++++++
 lib/meson.build          |   1 +
 lib/tests/igt_kmemleak.c | 291 +++++++++++++++++++++++++++++++++++++++
 lib/tests/meson.build    |   1 +
 5 files changed, 516 insertions(+)
 create mode 100644 lib/igt_kmemleak.c
 create mode 100644 lib/igt_kmemleak.h
 create mode 100644 lib/tests/igt_kmemleak.c
lib/igt_kmemleak.c new file +57 -0
new file mode 100644
index 000000000..02ee0361d
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <libudev.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "igt_core.h"
+#include "igt_device_scan.h"
+#include "igt_kmemleak.h"
+#include "igt_kmod.h"
+#include "igt_list.h"
+
+/* We can change the path for unit testing, see igt_kmemleak_init() */
+static char igt_kmemleak_file[256] = "/sys/kernel/debug/kmemleak";
+
+/**
+ * igt_kmemeak_init:
+ * @igt_kmemleak_file: update the path to kmemleak file to enable unit testing
+ *
+ * Check if kmemleak is enabled in the kernel, if debugfs is mounted and
+ * if kmemleak file is present and readable.
+ *
+ * Returns: true if kmemleak is enabled, false otherwise.
+ */
+bool igt_kmemleak_init(const char *unit_test_kmemleak_file)
+{
+	FILE *fp;
+
+	if (unit_test_kmemleak_file)
+		snprintf(igt_kmemleak_file,
+			 sizeof(igt_kmemleak_file),
+			 "%s",
+			 unit_test_kmemleak_file);
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cmd:
+ * @cmd: command to send to kmemleak
+ *
+ * Send a command to kmemleak.
+ *
+ * Returns: true if sending the command was successful, false otherwise.
+ */
+bool igt_kmemleak_cmd(const char *cmd)
+{

lib/igt_kmemleak.c line 67

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	FILE *fp;
+
+	fp = fopen(igt_kmemleak_file, "r+");
+	if (!fp)
+		return false;
+
+	if (fwrite(cmd, 1, strlen(cmd), fp) != strlen(cmd)) {
+		fclose(fp);
+		return false;
+	}

Maybe we can reduce the number of fclose calls by capturing the fwrite return value:
"""
bool igt_kmemleak_cmd(const char *cmd)

{
	FILE *fp;
	size_t wlen;

	fp = fopen(igt_kmemleak_file, "r+");
	if (!fp)
		return false;

	wlen = fwrite(cmd, 1, strlen(cmd), fp);
	fclose(fp);

	return wlen == strlen(cmd);
}

"""
Though that's not strictly necessary here.

Quoted 40 lines
lib/igt_kmemleak.c new file +40 -0
+
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_scan:
+ *
+ * Trigger an immediate scan on kmemleak.
+ *
+ * Returns: true if sending the command to scan was successful, false otherwise.
+ */
+bool igt_kmemleak_scan(void)
+{
+	return igt_kmemleak_cmd("scan");
+}
+
+/**
+ * igt_kmemeak_clear:
+ *
+ * Trigger an immediate clear on kmemleak.
+ *
+ * Returns: true if sending the command to clear was successful, false
+ * otherwise.
+ */
+bool igt_kmemleak_clear(void)
+{
+	return igt_kmemleak_cmd("clear");
+}
+
+/**
+ * igt_kmemeak_found_leaks:
+ *
+ * Check if kmemleak found any leaks.
+ *
+ * Returns: true if kmemleak found any leaks, false otherwise.
+ */
+bool igt_kmemleak_found_leaks(void)
+{
+	FILE *fp;

lib/igt_kmemleak.c line 117

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	char buf[1];
+
+	fp = fopen(igt_kmemleak_file, "r");
+	if (!fp)
+		return false;
+
+	if (fread(buf, 1, 1, fp) <= 0) {
+		fclose(fp);
+		return false;
+	}

Same comment as with igt_kmemleak_cmd above:
"""
bool igt_kmemleak_found_leak(void)

{
	FILE *fp;
	char buf[1];
	size_t rlen;

	fp = fopen(igt_kmemleak_file, "r");
	if (!fp)
		return false;

	rlen = fread(buf, 1, 1, fp);
	fclose(fp);

	return rlen > 0;
}

"""
Though, again, this isn't strictly necessary.

Quoted 25 lines
lib/igt_kmemleak.c new file +25 -0
+
+	/* fread() did read 1 char */
+	fclose(fp);
+	return true;
+}
+
+/**
+ * igt_kmemeak_cp_leaks_file:
+ * @dst: path of destination file including the file name
+ *
+ * Copy kmemleak file to dst.
+ *
+ * Returns: true if copy was successful, false otherwise
+ */
+bool igt_kmemleak_cp_leaks_file(const char *dst)
+{
+	FILE *src, *dest;
+	char buf[1024];
+	size_t n;
+
+	src = fopen(igt_kmemleak_file, "r");
+	if (!src)
+		return false;
+
+	dest = fopen(dst, "w");

lib/igt_kmemleak.c line 152

Quoted 10 lines
lib/igt_kmemleak.c new file +10 -0
+	if (!dest) {
+		fclose(src);
+		return false;
+	}
+
+	while ((n = fread(buf, 1, sizeof(buf), src)) > 0)
+		fwrite(buf, 1, n, dest);
+
+	fclose(src);
+	fclose(dest);

I think these two fclose calls should swap places for style reasons, but it's also not particularly important.

Quoted 16 lines
lib/igt_kmemleak.c new file +2 -0
+	return true;
+}
lib/igt_kmemleak.h new file +8 -0
new file mode 100644
index 000000000..a65f31810
@@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: MIT
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef IGT_KMEMLEAK_H
+#define IGT_KMEMLEAK_H
+
+#include <stdbool.h>

lib/igt_kmemleak.h line 18

Quoted 10 lines
lib/igt_kmemleak.h new file +10 -0
+
+/**
+ * igt_kmemeak_init:
+ * @igt_kmemleak_file: update the path to kmemleak file to enable unit testing
+ *
+ * Check if kmemleak is enabled in the kernel, if debugfs is mounted and
+ * if kmemleak file is present and readable.
+ *
+ * Returns: true if kmemleak is enabled, false otherwise.
+ */

I don't think we need comments like this for both the implementation and the header file. The former should be sufficient.

Quoted 309 lines
lib/igt_kmemleak.h new file +51 -0
+bool igt_kmemleak_init(const char *unit_test_kmemleak_file);
+
+/**
+ * igt_kmemeak_cmd:
+ * @cmd: command to send to kmemleak
+ *
+ * Send a command to kmemleak.
+ *
+ * Returns: true if sending the command was successful, false otherwise.
+ */
+bool igt_kmemleak_cmd(const char *cmd);
+
+/**
+ * igt_kmemeak_scan:
+ *
+ * Trigger an immediate scan on kmemleak.
+ *
+ * Returns: true if sending the command to scan was successful, false otherwise.
+ */
+bool igt_kmemleak_scan(void);
+
+/**
+ * igt_kmemeak_clear:
+ *
+ * Trigger an immediate clear on kmemleak.
+ *
+ * Returns: true if sending the command to clear was successful, false
+ * otherwise.
+ */
+bool igt_kmemleak_clear(void);
+
+/**
+ * igt_kmemeak_found_leaks:
+ *
+ * Check if kmemleak found any leaks.
+ *
+ * Returns: true if kmemleak found any leaks, false otherwise.
+ */
+bool igt_kmemleak_found_leaks(void);
+
+/**
+ * igt_kmemeak_cp_leaks_file:
+ * @dst: path of destination file including the file name
+ *
+ * Copy kmemleak file to dst.
+ *
+ * Returns: true if copy was successful, false otherwise
+ */
+bool igt_kmemleak_cp_leaks_file(const char *dst);
+
+#endif /* IGT_KMEMLEAK_H */
lib/meson.build +1 -0
index 640513e6c..24423ef37 100644
@@ -96,6 +96,7 @@ lib_sources = [
 	'igt_dummyload.c',
 	'igt_store.c',
 	'uwildmat/uwildmat.c',
+	'igt_kmemleak.c',
 	'igt_kmod.c',
 	'igt_ktap.c',
 	'igt_panfrost.c',
lib/tests/igt_kmemleak.c new file +240 -0
new file mode 100644
index 000000000..f5bf5ca07
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <zlib.h>
+
+#include "igt_core.h"
+#include "igt_kmemleak.h"
+
+const char *kmemleak_file_example =
+"unreferenced object 0xffff888102a2e638 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   00 00 00 00 00 00 00 00 0d 01 a2 00 00 00 00 00  ................\n"
+"   f0 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc 2df71a7e):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2ed18 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   38 e6 a2 02 81 88 ff ff 0d 11 2d 00 00 00 00 00  8.........-.....\n"
+"   f2 7c 03 00 00 c9 ff ff 58 ea a2 02 81 88 ff ff  .|......X.......\n"
+" backtrace (crc ec2a8bdc):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2ea58 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   38 e6 a2 02 81 88 ff ff 0d 01 a0 00 00 00 00 00  8...............\n"
+"   f6 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc f911c0d1):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e428 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   58 ea a2 02 81 88 ff ff 0d 01 35 00 00 00 00 00  X.........5.....\n"
+"   fc 7c 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .|..............\n"
+" backtrace (crc cb8aaffd):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e008 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   28 e4 a2 02 81 88 ff ff 0d 01 2d 00 00 00 00 00  (.........-.....\n"
+"   fc 7c 03 00 00 c9 ff ff c8 e2 a2 02 81 88 ff ff  .|..............\n"
+" backtrace (crc 7f883e78):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2b9e5>] acpi_ps_get_next_namepath+0x1f5/0x390\n"
+"   [<ffffffff81c2cc15>] acpi_ps_parse_loop+0x4a5/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e2c8 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   28 e4 a2 02 81 88 ff ff 0d 01 73 00 00 00 00 00  (.........s.....\n"
+"   00 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc 338c016):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e378 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   c8 e2 a2 02 81 88 ff ff 0d 01 0d 00 00 00 00 00  ................\n"
+"   01 7d 03 00 00 c9 ff ff 98 e7 a2 02 81 88 ff ff  .}..............\n"
+" backtrace (crc 665fb8a7):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e798 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   7c8 e2 a2 02 81 88 ff ff 0d 01 98 00 00 00 00 00  ................\n"
+"   1b 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc b7a23a1c):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170"
+"unreferenced object 0xffff888102a2e0b8 (size 80):\n"
+" comm \"swapper/0\", pid 1, jiffies 4294672730\n"
+" hex dump (first 32 bytes):\n"
+"   98 e7 a2 02 81 88 ff ff 0d 01 2d 00 00 00 00 00  ..........-.....\n"
+"   1c 7d 03 00 00 c9 ff ff 00 00 00 00 00 00 00 00  .}..............\n"
+" backtrace (crc 14d67a9c):\n"
+"   [<ffffffff824cd71b>] kmemleak_alloc+0x4b/0x80\n"
+"   [<ffffffff814e169b>] kmem_cache_alloc_noprof+0x2ab/0x370\n"
+"   [<ffffffff81c2f4dc>] acpi_ps_alloc_op+0xdc/0xf0\n"
+"   [<ffffffff81c2d650>] acpi_ps_create_op+0x1c0/0x400\n"
+"   [<ffffffff81c2c8dc>] acpi_ps_parse_loop+0x16c/0xa60\n"
+"   [<ffffffff81c2e94f>] acpi_ps_parse_aml+0x22f/0x5f0\n"
+"   [<ffffffff81c2fa82>] acpi_ps_execute_method+0x152/0x380\n"
+"   [<ffffffff81c233ed>] acpi_ns_evaluate+0x31d/0x5e0\n"
+"   [<ffffffff81c2a606>] acpi_evaluate_object+0x206/0x490\n"
+"   [<ffffffff81bf1202>] __acpi_power_off.isra.0+0x22/0x70\n"
+"   [<ffffffff81bf275b>] acpi_turn_off_unused_power_resources+0xbb/0xf0\n"
+"   [<ffffffff83867799>] acpi_scan_init+0x119/0x290\n"
+"   [<ffffffff8386711a>] acpi_init+0x23a/0x590\n"
+"   [<ffffffff81002c71>] do_one_initcall+0x61/0x3d0\n"
+"   [<ffffffff837dce32>] kernel_init_freeable+0x3e2/0x680\n"
+"   [<ffffffff824ca53b>] kernel_init+0x1b/0x170\n";
+
+static unsigned long crc32_file(int fd)
+{
+	unsigned long crc;
+	char buf[1024];
+	ssize_t n;
+
+	crc = crc32(0, Z_NULL, 0);
+	while ((n = read(fd, buf, sizeof(buf))) > 0)
+		crc = crc32(crc, (const Bytef *)buf, n);
+
+	return crc;
+}
+
+static void test_igt_kmemleak_cp_leaks_file(void)
+{
+	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
+	int fd;
+	unsigned long crc;
+
+	fd = mkstemp(dst_file_path);
+	close(fd);
+
+	igt_assert(igt_kmemleak_cp_leaks_file(dst_file_path));
+
+	/* Test that both files have the same size */
+	fd = open(dst_file_path, O_RDONLY);
+	igt_assert(fd >= 0);
Quoted 8 lines

lib/tests/igt_kmemleak.c line 248

Quoted 8 lines
lib/tests/igt_kmemleak.c new file +8 -0
+	igt_assert(lseek(fd, 0, SEEK_END) == strlen(kmemleak_file_example));
+	close(fd);
+
+	/* Test that both files have the same content */
+	crc = crc32(0, Z_NULL, 0);
+	crc = crc32(crc,
+		    (const Bytef *)kmemleak_file_example,
+		    strlen(kmemleak_file_example));

Did you miss the changes to compare the CRC?

Regards,
Bala

Quoted 139 lines
Quoted 25 lines
lib/tests/igt_kmemleak.c new file +25 -0
+
+	fd = open(dst_file_path, O_RDONLY);
+	igt_assert(fd >= 0);
+	igt_info(" dst_file: %s\n", dst_file_path);
+	close(fd);
+}
+
+static void test_empty_file(void)
+{
+	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
+	int fd;
+
+	fd = mkstemp(tmp_file_path);
+	igt_assert(fd >= 0);
+	close(fd);
+
+	/* Set the path for the unit testing file */
+	igt_assert(igt_kmemleak_init(tmp_file_path));
+	igt_assert(!igt_kmemleak_found_leaks());
+}
+
+static void test_non_empty_file(void)
+{
+	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
+	int fd;

lib/tests/igt_kmemleak.c line 283

Quoted 10 lines
lib/tests/igt_kmemleak.c new file +10 -0
+
+	fd = mkstemp(tmp_file_path);
+	igt_assert(fd >= 0);
+	write(fd, kmemleak_file_example, strlen(kmemleak_file_example));
+
+	/* Set the path for the unit testing file */
+	igt_assert(igt_kmemleak_init(tmp_file_path));
+
+	/* Test igt_kmemleak_found_leaks() that should return true */
+	igt_assert(igt_kmemleak_found_leaks());

test_empty_file and test_non_empty_file could probably be consolidated into a single "test_file" or "test_kmemleak_file" test with a Boolean determining if we want to write to the test file or not:
"""
static void test_kmemleak_file(bool write)

{
	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
	int fd = mkstemp(tmp_file_path);
	igt_assert(fd >= 0);

	if (write)
		write(fd, kmemleak_file_example, strlen(kmemleak_file_example));

	/* Set the path for the unit testing file */
	igt_assert(igt_kmemleak_init(tmp_file_path));
	
	/* Test igt_kmemleak_found_leaks() returns true if written */
	igt_assert(igt_kmemleak_found_leaks() == write);

	close(fd);
}
...
igt_simple_main
{
	test_kmemleak_file(false);
	test_kmemleak_file(true);
	test_igt_kmemleak_cp_leaks_file();
}

"""

lib/tests/igt_kmemleak.c line 290

Quoted 7 lines
lib/tests/igt_kmemleak.c new file +7 -0
+}
+
+igt_simple_main
+{
+	test_empty_file();
+	test_non_empty_file();
+	test_igt_kmemleak_cp_leaks_file();

It might be better to separate these out into their own subtests:
"""

	igt_subtest_f("empty-file")
		test_empty_file();
	igt_subtest_f("non-empty-file")
		test_non_empty_file();
	igt_subtest_f("cp-leaks-file")
		test_igt_kmemleak_cp_leaks_file();

"""

Though looking at it a bit closer, I see that test_igt_kmemleak_cp_leaks_file depends on the completion of test_non_empty_file to run properly? Maybe we should separate the test out into chunks?

Let me try prototyping it here:
"""
--- Original file up to end of crc32_file function is unchanged ---

static void init_kmemleak_file(bool write)
{
--- Same as test_kmemleak_file from earlier suggestion --- }

static void test_kmemleak_cp_leaks_file(void)

{
	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
	int fd;
	unsigned long crc;

	init_kmemleak_file(true);

	fd = mkstemp(dst_file_path);

--- Rest of test is unchanged after this point --- }

igt_main

{
	igt_subtest_f("empty")
		init_kmemleak_file(false);
	igt_subtest_f("non-empty")
		init_kmemleak_file(true);
	igt_subtest_f("cp-leaks-file")
		test_kmemleak_cp_leaks_file();
}

"""

-Jonathan Cavitt

Quoted 17 lines
lib/tests/igt_kmemleak.c new file +1 -0
+}
lib/tests/meson.build +1 -0
index df8092638..bcbea9ba4 100644
@@ -15,6 +15,7 @@ lib_tests = [
         'igt_ktap_parser',
 	'igt_list_only',
 	'igt_invalid_subtest_name',
+	'igt_kmemleak',
 	'igt_nesting',
 	'igt_no_exit',
 	'igt_runnercomms_packets',
Signature · 1 line
2.34.1
#7 lore raw

Dear Bala,

Thank you for your review!

[...]

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
lib/tests/igt_kmemleak.c new file +16 -0
+static void test_igt_kmemleak_cp_leaks_file(void)
+{
+	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
+	int fd;
+	unsigned long crc;
+
+	fd = mkstemp(dst_file_path);
+	close(fd);
+
+	igt_assert(igt_kmemleak_cp_leaks_file(dst_file_path));
+
+	/* Test that both files have the same size */
+	fd = open(dst_file_path, O_RDONLY);
+	igt_assert(fd >= 0);
+	igt_assert(lseek(fd, 0, SEEK_END) == strlen(kmemleak_file_example));
+	close(fd);
Quoted 8 lines
Quoted 6 lines

lib/tests/igt_kmemleak.c line 248

Quoted 6 lines
lib/tests/igt_kmemleak.c new file +6 -0
+
+	/* Test that both files have the same content */
+	crc = crc32(0, Z_NULL, 0);
+	crc = crc32(crc,
+		    (const Bytef *)kmemleak_file_example,
+		    strlen(kmemleak_file_example));

Did you miss the changes to compare the CRC?

Not only that, but I did not use crc32_file()... Thank you for catching this! Fixed on V1.

Quoted 4 lines

Regards,
Bala

[...]

#8 lore raw
In reply to Cavitt, Jonathan

Dear Jonathan,

Please see my comments below.

[...]

Quoted 5 lines

I'm not particularly well-versed in kmemleak, but nothing about this patch seems out of the ordinary. Though I can still offer some small style-related suggestions.
Also, do you want a reviewed-by for this? I'd give one right now but I don't think I should be Acking RFC patches.

I sent V1 a few instants ago, I guess it is a better place for a RB.

[...]

Quoted 17 lines

Maybe we can reduce the number of fclose calls by capturing the fwrite return value:
"""
bool igt_kmemleak_cmd(const char *cmd)

{
	FILE *fp;
	size_t wlen;

	fp = fopen(igt_kmemleak_file, "r+");
	if (!fp)
		return false;

	wlen = fwrite(cmd, 1, strlen(cmd), fp);
	fclose(fp);

	return wlen == strlen(cmd);
}
Quoted 2 lines

"""
Though that's not strictly necessary here.

Thank you for that! This change is on V1.

[...]

Quoted 18 lines

Same comment as with igt_kmemleak_cmd above:
"""
bool igt_kmemleak_found_leak(void)

{
	FILE *fp;
	char buf[1];
	size_t rlen;

	fp = fopen(igt_kmemleak_file, "r");
	if (!fp)
		return false;

	rlen = fread(buf, 1, 1, fp);
	fclose(fp);

	return rlen > 0;
}
Quoted 2 lines

"""
Though, again, this isn't strictly necessary.

Thank you for that! This change is on V1.

[...]

Quoted 3 lines

I don't think we need comments like this for both the implementation and the header file. The former should be sufficient.

Removed comments from the header file on V1.

[...]

Quoted 6 lines

test_empty_file and test_non_empty_file could probably be consolidated into a single "test_file" or "test_kmemleak_file" test with a Boolean determining if we want to write to the test file or not:
"""
static void test_kmemleak_file(bool write)

Quoted 15 lines
{
	char tmp_file_path[256] = "/tmp/igt_kmemleak_test_XXXXXX";
	int fd = mkstemp(tmp_file_path);
	igt_assert(fd >= 0);

	if (write)
		write(fd, kmemleak_file_example, strlen(kmemleak_file_example));

	/* Set the path for the unit testing file */
	igt_assert(igt_kmemleak_init(tmp_file_path));
	
	/* Test igt_kmemleak_found_leaks() returns true if written */
	igt_assert(igt_kmemleak_found_leaks() == write);

	close(fd);

I moved the shared part to test_kmemleak_file() but kept the two separate functions for the differences between them.

[...]

Quoted 10 lines

It might be better to separate these out into their own subtests:
"""

	igt_subtest_f("empty-file")
		test_empty_file();
	igt_subtest_f("non-empty-file")
		test_non_empty_file();
	igt_subtest_f("cp-leaks-file")
		test_igt_kmemleak_cp_leaks_file();

"""

Unfortunately this does not work. These are unit testing tests, and meson test -C build gets confused by the macro igt_subtest_f. That or I am doing something wrong.

Quoted 4 lines

Though looking at it a bit closer, I see that test_igt_kmemleak_cp_leaks_file depends on the completion of test_non_empty_file to run properly? Maybe we should separate the test out into chunks?

Oh, test_igt_kmemleak_cp_leaks_file() was broken. I changed it so that it has no dependencies, and that it uses crc32_file()...

Quoted 31 lines

Let me try prototyping it here:
"""
--- Original file up to end of crc32_file function is unchanged ---

static void init_kmemleak_file(bool write)
{
--- Same as test_kmemleak_file from earlier suggestion --- }

static void test_kmemleak_cp_leaks_file(void)

{
	char dst_file_path[256] = "/tmp/igt_kmemleak_dstfile_XXXXXX";
	int fd;
	unsigned long crc;

	init_kmemleak_file(true);

	fd = mkstemp(dst_file_path);

--- Rest of test is unchanged after this point --- }

igt_main

{
	igt_subtest_f("empty")
		init_kmemleak_file(false);
	igt_subtest_f("non-empty")
		init_kmemleak_file(true);
	igt_subtest_f("cp-leaks-file")
		test_kmemleak_cp_leaks_file();
}
Quoted 1 line

"""

It ended slightly different than that. Let me know what you think.

Thank you!