From: Gustavo Sousa <gustavo.sousa@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Gustavo Sousa <gustavo.sousa@intel.com>
Subject: [PATCH i-g-t v4 0/6] Add support for hook script
Date: Wed, 14 Aug 2024 17:47:55 -0300 [thread overview]
Message-ID: <20240814204822.95283-1-gustavo.sousa@intel.com> (raw)
For development purposes, sometimes it is useful to have a way of
running custom scripts at certain points of test executions. A
real-world example I bumped into recently is to collect information from
sysfs before and after running each entry of a testlist.
While it is possible for the user to handcraft a script that calls each
test with the correct actions before and after execution, we can provide
a better experience by adding built-in support for running hooks during
test execution.
This series adds support for running a hook script during test
execution. The feature is exposed to users via option --hook, which is
made available for regular test binaries as well as for igt_runner.
v2:
- Updated first patch to address review commands.
- Added support for multiple instances of --hook options with 4 extra
patches appended to the series. I thought about squashing them to
the original patches, but I preferred to keep them separated, since
supporting multiple --hook options can be seen as an extension and
should make the series easier to follow.
v3:
- Updated patches to address review comments. See the changelog in
each patch for details.
v4:
- Apply suggested nits.
Gustavo Sousa (6):
igt_hook: Add feature
runner: Make it easier to extend argv
runner: Add option --hook
igt_hook: Implement and use set_fake_argv() in test
igt_hook: Allow multiple hook descriptors
runner: Allow multiple --hook options
.../igt-gpu-tools/igt-gpu-tools-docs.xml | 1 +
lib/igt_core.c | 83 ++-
lib/igt_hook.c | 511 ++++++++++++++++++
lib/igt_hook.h | 70 +++
lib/meson.build | 1 +
lib/tests/igt_hook.c | 166 ++++++
lib/tests/igt_hook_integration.c | 371 +++++++++++++
lib/tests/meson.build | 2 +
runner/executor.c | 61 ++-
runner/runner_tests.c | 18 +
runner/settings.c | 168 +++++-
runner/settings.h | 2 +
12 files changed, 1426 insertions(+), 28 deletions(-)
create mode 100644 lib/igt_hook.c
create mode 100644 lib/igt_hook.h
create mode 100644 lib/tests/igt_hook.c
create mode 100644 lib/tests/igt_hook_integration.c
--
2.46.0
next reply other threads:[~2024-08-14 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 20:47 Gustavo Sousa [this message]
2024-08-14 20:47 ` [PATCH i-g-t v4 1/6] igt_hook: Add feature Gustavo Sousa
2024-08-14 20:47 ` [PATCH i-g-t v4 2/6] runner: Make it easier to extend argv Gustavo Sousa
2024-08-14 20:47 ` [PATCH i-g-t v4 3/6] runner: Add option --hook Gustavo Sousa
2024-08-14 20:47 ` [PATCH i-g-t v4 4/6] igt_hook: Implement and use set_fake_argv() in test Gustavo Sousa
2024-08-14 20:48 ` [PATCH i-g-t v4 5/6] igt_hook: Allow multiple hook descriptors Gustavo Sousa
2024-08-14 20:48 ` [PATCH i-g-t v4 6/6] runner: Allow multiple --hook options Gustavo Sousa
2024-08-14 22:30 ` ✓ CI.xeBAT: success for Add support for hook script (rev4) Patchwork
2024-08-14 22:41 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-16 5:33 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-21 16:49 ` Matt Roper
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=20240814204822.95283-1-gustavo.sousa@intel.com \
--to=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@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