Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v3 0/6] Add support for hook script
@ 2024-07-25 14:19 Gustavo Sousa
  2024-07-25 14:19 ` [PATCH i-g-t v3 1/6] igt_hook: Add feature Gustavo Sousa
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Gustavo Sousa @ 2024-07-25 14:19 UTC (permalink / raw)
  To: igt-dev; +Cc: Lucas De Marchi

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 comments.
  - 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.

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              | 374 +++++++++++++
 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, 1429 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.45.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-08-12 14:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 14:19 [PATCH i-g-t v3 0/6] Add support for hook script Gustavo Sousa
2024-07-25 14:19 ` [PATCH i-g-t v3 1/6] igt_hook: Add feature Gustavo Sousa
2024-08-12 13:52   ` Lucas De Marchi
2024-07-25 14:19 ` [PATCH i-g-t v3 2/6] runner: Make it easier to extend argv Gustavo Sousa
2024-08-12 13:54   ` Lucas De Marchi
2024-07-25 14:19 ` [PATCH i-g-t v3 3/6] runner: Add option --hook Gustavo Sousa
2024-08-12 13:55   ` Lucas De Marchi
2024-07-25 14:19 ` [PATCH i-g-t v3 4/6] igt_hook: Implement and use set_fake_argv() in test Gustavo Sousa
2024-08-12 13:58   ` Lucas De Marchi
2024-07-25 14:19 ` [PATCH i-g-t v3 5/6] igt_hook: Allow multiple hook descriptors Gustavo Sousa
2024-08-12 14:01   ` Lucas De Marchi
2024-07-25 14:19 ` [PATCH i-g-t v3 6/6] runner: Allow multiple --hook options Gustavo Sousa
2024-08-12 14:06   ` Lucas De Marchi
2024-07-25 18:05 ` ✓ CI.xeBAT: success for Add support for hook script (rev3) Patchwork
2024-07-25 18:11 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-25 22:49 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-26 11:36 ` ✗ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox