linux/tools/testing
Martin Kaiser 8e731f2db4 selftests/ftrace: refactor eprobes test to fix argument checks
[ Upstream commit 6e3abef2a2 ]

The add/remove eprobe test installs an eprobe for the openat syscall and
runs ls. It checks the filenames that were opened by ls against a
whitelist and a blacklist.

Commit 206b25c090 ("tracing: eprobe: read the complete FILTER_PTR_STRING
pointer") fixed access to some string fields in eprobes. This triggers
test failures as the blacklist does not allow relative paths for the
openat parameters.

What makes this test unstable is the fact that the openat calls vary a
lot between different systems.

Refactor the test to make it more robust. "cd <directory>" will issue a
chdir syscall with the target directory as parameter. Set an eprobe on
the sys_enter_chdir event and filter for the exact directory name. Allow
(fault) as fallback.

Link: https://lore.kernel.org/all/20260804194705.760893-1-martin@kaiser.cx/

Fixes: 206b25c090 ("tracing: eprobe: read the complete FILTER_PTR_STRING pointer")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202607151010.b68428e1-lkp@intel.com
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-08-19 17:14:13 +02:00
..
fault-injection docs: fault-injection: convert docs to ReST and rename to *.rst 2019-06-14 14:21:07 -06:00
ktest ktest: Run POST_KTEST hooks on failure and cancellation 2026-06-01 17:35:32 +02:00
kunit kunit: tool: Import missing importlib.abc 2022-02-23 12:03:04 +01:00
nvdimm tools/testing/nvdimm: Use per-DIMM device handle 2026-01-19 13:09:52 +01:00
radix-tree idr: fix idr_alloc() returning an ID out of range 2026-01-19 13:10:02 +01:00
scatterlist Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
selftests selftests/ftrace: refactor eprobes test to fix argument checks 2026-08-19 17:14:13 +02:00
vsock vsock/test: add a final full barrier after run all tests 2026-02-06 16:41:46 +01:00