From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Peter Senna Tschudin <peter.senna@linux.intel.com>,
marcin.bernatowicz@intel.com, himanshu.girotra@intel.com,
aditya.chauhan@intel.com, pravalika.gurram@intel.com,
sai.gowtham.ch@intel.com, ramadevi.gandi@intel.com,
lucas.demarchi@intel.com, rodrigo.vivi@intel.com,
kamil.konieczny@linux.intel.com, katarzyna.piecielska@intel.com
Subject: [RFC i-g-t 4/5] tests/core_sysfs: Add GPU-agnostic sysfs testing
Date: Wed, 14 May 2025 19:51:36 +0200 [thread overview]
Message-ID: <20250514175140.115033-5-peter.senna@linux.intel.com> (raw)
In-Reply-To: <20250514175140.115033-1-peter.senna@linux.intel.com>
Introduces core_sysfs, a GPU-agnostic test designed to work with any
GPU, not limited to i915 and Xe.
The test scans the sysfs directory associated with the GPU, reads all
files, and discards the content.
Cc: marcin.bernatowicz@intel.com
Cc: himanshu.girotra@intel.com
Cc: aditya.chauhan@intel.com
Cc: pravalika.gurram@intel.com
Cc: sai.gowtham.ch@intel.com
Cc: ramadevi.gandi@intel.com
Cc: lucas.demarchi@intel.com
Cc: rodrigo.vivi@intel.com
Cc: kamil.konieczny@linux.intel.com
Cc: katarzyna.piecielska@intel.com
Signed-off-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
---
tests/core_sysfs.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 53 insertions(+)
create mode 100644 tests/core_sysfs.c
diff --git a/tests/core_sysfs.c b/tests/core_sysfs.c
new file mode 100644
index 000000000..9c408275e
--- /dev/null
+++ b/tests/core_sysfs.c
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#include "igt.h"
+#include "igt_dir_explorer.h"
+#include "igt_sysfs.h"
+
+struct {
+ bool warn_on_not_hit;
+} opt = { 0 };
+
+/**
+ * TEST: sysfs test
+ * Description: Read entries from sysfs path.
+ * Category: Core
+ * Mega feature: General Core features
+ * Sub-category: uapi
+ * Functionality: sysfs
+ * Feature: core
+ * Test category: uapi
+ *
+ * SUBTEST: sysfs-read-all-entries
+ * Description: Read all entries from sysfs path
+ *
+ */
+
+IGT_TEST_DESCRIPTION("Read entries from sysfs paths.");
+
+igt_main
+{
+ int fd = -1;
+ int sysfs = -1;
+
+ igt_fixture {
+ fd = drm_open_driver_master(DRIVER_ANY);
+ sysfs = igt_sysfs_open(fd);
+ igt_require(sysfs >= 0);
+
+ kmstest_set_vt_graphics_mode();
+ }
+
+ igt_describe("Read all entries from sysfs path.");
+ igt_subtest("sysfs-read-all-entries")
+ igt_dir_explorer_read_and_discard_all(sysfs, 0);
+
+ igt_fixture {
+ close(sysfs);
+ drm_close_driver(fd);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index c7a689ab3..eac77fb81 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -8,6 +8,7 @@ test_progs = [
'core_hotunplug',
'core_setmaster',
'core_setmaster_vs_auth',
+ 'core_sysfs',
'dmabuf',
'dmabuf_sync_file',
'device_reset',
--
2.43.0
next prev parent reply other threads:[~2025-05-14 17:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 17:51 [RFC i-g-t 0/5] Replace intel_sysfs_debugfs Peter Senna Tschudin
2025-05-14 17:51 ` [RFC i-g-t 1/5] Remove tests/intel/intel_sysfs_debugfs Peter Senna Tschudin
2025-05-14 17:51 ` [RFC i-g-t 2/5] lib/igt_dir_explorer: Add function to recursively read all files in a directory Peter Senna Tschudin
2025-05-15 8:51 ` Zbigniew Kempczyński
2025-05-15 9:04 ` Peter Senna Tschudin
2025-05-16 5:35 ` Zbigniew Kempczyński
2025-05-15 16:40 ` Peter Senna Tschudin
2025-05-16 5:46 ` Zbigniew Kempczyński
2025-05-14 17:51 ` [RFC i-g-t 3/5] Add tests: core_debugfs and core_debugfs_display_on_off Peter Senna Tschudin
2025-05-14 17:51 ` Peter Senna Tschudin [this message]
2025-05-14 17:51 ` [RFC i-g-t 5/5] tests/intel/xe_debugfs: Add Xe-specific debugfs testing Peter Senna Tschudin
2025-05-14 19:24 ` ✗ Xe.CI.BAT: failure for Replace intel_sysfs_debugfs Patchwork
2025-05-14 19:44 ` ✗ i915.CI.BAT: " Patchwork
2025-05-15 2:40 ` ✗ Xe.CI.Full: " Patchwork
2025-05-20 19:29 ` [RFC v2 i-g-t 0/5] " Peter Senna Tschudin
2025-05-20 19:29 ` [RFC v2 i-g-t 1/5] Remove tests/intel/intel_sysfs_debugfs Peter Senna Tschudin
2025-05-20 19:29 ` [RFC v2 i-g-t 2/5] lib/igt_dir: Directory processing and flexible file handling Peter Senna Tschudin
2025-05-20 19:29 ` [RFC v2 i-g-t 3/5] Add tests: core_debugfs and core_debugfs_display_on_off Peter Senna Tschudin
2025-05-20 19:29 ` [RFC v2 i-g-t 4/5] tests/core_sysfs: Add GPU-agnostic sysfs testing Peter Senna Tschudin
2025-05-20 19:29 ` [RFC v2 i-g-t 5/5] tests/intel/xe_debugfs: Add Xe-specific debugfs testing Peter Senna Tschudin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250514175140.115033-5-peter.senna@linux.intel.com \
--to=peter.senna@linux.intel.com \
--cc=aditya.chauhan@intel.com \
--cc=himanshu.girotra@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=katarzyna.piecielska@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=marcin.bernatowicz@intel.com \
--cc=pravalika.gurram@intel.com \
--cc=ramadevi.gandi@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=sai.gowtham.ch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox