From: Jani Nikula <jani.nikula@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Sobin Thomas <sobin.thomas@intel.com>,
igt-dev@lists.freedesktop.org, piotr.piorkowski@intel.com,
kamil.konieczny@intel.com
Subject: Re: [PATCH i-g-t v2] tests/xe_debugfs: Add debugfs entry read/write validation in root-dir
Date: Mon, 15 Jun 2026 18:01:28 +0300 [thread overview]
Message-ID: <69131f4fca5ccc406b9f099eb739a49e985c7c2c@intel.com> (raw)
In-Reply-To: <20260615132525.auyklbqr42ddg6tv@kamilkon-DESK.igk.intel.com>
On Mon, 15 Jun 2026, Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Hi Jani,
> On 2026-06-15 at 15:58:24 +0300, Jani Nikula wrote:
>> On Mon, 15 Jun 2026, Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
>> > Hi Jani,
>> > On 2026-06-15 at 14:10:22 +0300, Jani Nikula wrote:
>> >> On Mon, 15 Jun 2026, Sobin Thomas <sobin.thomas@intel.com> wrote:
>> >> > Extend the root-dir subtest to validate additional optional Xe debugfs
>> >> > entries. Optional entries are those that may not be present on all
>> >> > platforms or configurations — their absence is not treated as a failure.
>> >> >
>> >> > - dgfx_pkg_residencies: Validate counter reads (non-empty)
>> >> > - dgfx_pcie_link_residencies: Validate PCIE LINK string content
>> >> > - sriov_info: Validate entry is non-empty
>> >> > - workarounds: Validate entry is non-empty
>> >> > - atomic_svm_timeslice_ms: Validate integer read/write
>> >> > - poor_man_system_atomic_support: Validate boolean read/write
>> >> > - disable_late_binding: Validate boolean read/write
>> >> >
>> >> > v2: Fixed the optional file check and added fail count.
>> >> > Replaced igt_debug with igt_info in few places (kamil)
>> >>
>> >> Why is the plumbing in this patch so xe focused? Looks like a lot of
>> >> this could be IGT generic and driver agnostic, with just the debugfs
>> >> hierarchy and filenames and requirements for each file described per
>> >> driver.
>> >>
>> >> BR,
>> >> Jani.
>> >>
>> >
>> > imho we should keep core_debugfs free of driver-specific checks,
>> > as it do not know which entries are safe to write to. Also, it
>> > is good to have a simple read-all core tests for sysfs/debugs and
>> > keep them simple.
>> >
>> > Thats why driver-specific checks should be done in
>> > driver-specific test.
>>
>> I don't think you understood what I meant at all.
>
> Well, feel free to write quick and short rfc with your proposed
> changes in code. I could comment on that.
The point is, enum debugfs_validate_type, struct check_entry,
validate_string(), mode_to_str(), validate_bool_file(),
validate_int_file(), validate_debugfs_file(), etc, are all driver
agnostic types and functions *already*, placed in driver specific code.
If anyone else wants to do similar validation for other drivers, they
either need to reinvent the wheel or refactor this. Which is just wasted
effort. If folks reinvent the wheel in other drivers, in subtly
different ways, consolidating them later is exponential wasted effort.
Which debugfs files a driver should have, or what they should contain,
is driver specific. How to check those debugfs files is not.
BR,
Jani.
>
> Btw did you mean that 'validate entry is non-empty' could be
> dropped from this patch? Now as I look again, they are already
> checked by core_debugsfs (or at least should be checked).
>
> Regards,
> Kamil
>
>
>>
>> BR,
>> Jani.
>>
>> >
>> > Regards,
>> > Kamil
>> >
>> >>
>> >> >
>> >> > Signed-off-by: Sobin Thomas <sobin.thomas@intel.com>
>> >> > ---
>> >> > tests/intel/xe_debugfs.c | 198 ++++++++++++++++++++++++++++++++++++---
>> > [cut]
>>
>> --
>> Jani Nikula, Intel
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-06-15 15:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 4:30 [PATCH i-g-t v2] tests/xe_debugfs: Add debugfs entry read/write validation in root-dir Sobin Thomas
2026-06-15 5:33 ` ✓ Xe.CI.BAT: success for tests/xe_debugfs: Add debugfs entry read/write validation in root-dir (rev3) Patchwork
2026-06-15 5:48 ` ✓ i915.CI.BAT: " Patchwork
2026-06-15 6:32 ` ✓ Xe.CI.FULL: " Patchwork
2026-06-15 7:43 ` ✓ i915.CI.Full: " Patchwork
2026-06-15 10:39 ` [PATCH i-g-t v2] tests/xe_debugfs: Add debugfs entry read/write validation in root-dir Piotr Piórkowski
2026-06-15 11:10 ` Jani Nikula
2026-06-15 12:02 ` Kamil Konieczny
2026-06-15 12:58 ` Jani Nikula
2026-06-15 13:25 ` Kamil Konieczny
2026-06-15 15:01 ` Jani Nikula [this message]
2026-06-15 11:16 ` Kamil Konieczny
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=69131f4fca5ccc406b9f099eb739a49e985c7c2c@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=piotr.piorkowski@intel.com \
--cc=sobin.thomas@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.