Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Subject: [PATCH i-g-t v3 0/6] lib/kunit: Support writable filter* parameters of kunit module
Date: Thu,  1 Feb 2024 19:59:16 +0100	[thread overview]
Message-ID: <20240201190237.150754-8-janusz.krzysztofik@linux.intel.com> (raw)

Instead of wasting resources on reloading the base Kunit module each time
a different set of filter parameters is needed, try to write the required
values to sysfs representation of those parameters.  If that fails (e.g.
on older LTS kernels with read-only filter parameters), fall back to
reloading the module.

This change also provides a workaround for the issue of impossibility to
unload the base Kunit module on Xe platforms, available as soon as the
module supports writable filter parameters.

While being at it, fine tune processing of skips on errors during test
case list collection phase.

v3: Don't read-compare-write, just write the values (Lucas),
  - skip calling igt_sysfs_set() when the string to be written to
    filter_action is empty (Lucas),
  - warn if we leave the filter_action set to "skip" while setting a non-
    default value of the filter parameter,
  - transform generic kunit_set_params() to kunit_set_filtering().
v2: Work around ineffective writes of empty strings to sysfs module
    parameter files (Lucas) by using human readable non-empty strings that
    give the same results as default NULLs,
  - drop fallback to reload of base Kunit module method if assigning new
    values to module parameters via sysfs fails (Lucas), instead use the
    existing fallback to blind execution like if getting a list of test
    cases was not supported at all,
  - split move of open_parameters() helper up in the source file as well
    as cleanup of base KUnit module unloading to separate patches (Kamil),
  - skip on empty list of test cases (new patch),
  - address the issue of commit description suggesting two separate
    changes combined in one patch (Kamil).

Janusz Krzysztofik (6):
  lib/kunit: Skip on empty list of test cases
  lib/kmode: Prepare open_parameters() helper for reuse by kunit
  lib/kunit: Unload base KUnit module only before reloading it
  lib/kunit: Support writable filter* parameters of kunit module
  lib/kunit: Report early kernel taints explicitly
  lib/kunit: Process module remove error after list errors

 lib/igt_kmod.c | 115 +++++++++++++++++++++++++++++++++----------------
 1 file changed, 79 insertions(+), 36 deletions(-)

-- 
2.43.0


             reply	other threads:[~2024-02-01 19:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 18:59 Janusz Krzysztofik [this message]
2024-02-01 18:59 ` [PATCH i-g-t v3 1/6] lib/kunit: Skip on empty list of test cases Janusz Krzysztofik
2024-02-01 18:59 ` [PATCH i-g-t v3 2/6] lib/kmode: Prepare open_parameters() helper for reuse by kunit Janusz Krzysztofik
2024-02-01 18:59 ` [PATCH i-g-t v3 3/6] lib/kunit: Unload base KUnit module only before reloading it Janusz Krzysztofik
2024-02-02 10:37   ` Kamil Konieczny
2024-02-01 18:59 ` [PATCH i-g-t v3 4/6] lib/kunit: Support writable filter* parameters of kunit module Janusz Krzysztofik
2024-02-01 20:26   ` Lucas De Marchi
2024-02-02 10:14     ` Janusz Krzysztofik
2024-02-02 15:57       ` Lucas De Marchi
2024-02-05 12:38         ` Janusz Krzysztofik
2024-02-01 18:59 ` [PATCH i-g-t v3 5/6] lib/kunit: Report early kernel taints explicitly Janusz Krzysztofik
2024-02-01 18:59 ` [PATCH i-g-t v3 6/6] lib/kunit: Process module remove error after list errors Janusz Krzysztofik
2024-02-01 20:55 ` ✗ CI.Patch_applied: failure for lib/kunit: Support writable filter* parameters of kunit module (rev3) Patchwork

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=20240201190237.150754-8-janusz.krzysztofik@linux.intel.com \
    --to=janusz.krzysztofik@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=mchehab@kernel.org \
    /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