diff options
| author | Martin Kaiser <martin@kaiser.cx> | 2026-04-28 16:38:47 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-05-11 14:16:28 -0300 |
| commit | 9a4a67dddc3d88e2e9d3cff462b943f40ea439e4 (patch) | |
| tree | b9f378641f6b3ff86c601805a05231ce0f58ae4a | |
| parent | a4cbd51862d449e487866c173f5dff46329da76c (diff) | |
| download | linux-stable-9a4a67dddc3d88e2e9d3cff462b943f40ea439e4.tar.gz linux-stable-9a4a67dddc3d88e2e9d3cff462b943f40ea439e4.zip | |
perf test: Fix sys_enter_openat event test for musl
The "syscalls:sys_enter_openat event fields" test calls
openat(AT_FDCWD, "/etc/passwd", O_RDONLY | O_DIRECTORY)
and verifies that the flags of the captured event are matching.
This fails for musl, where the openat syscall wrapper always adds
O_LARGEFILE.
Update the check to allow for additional flags, the access mode flags
must be unchanged.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/perf/tests/openat-syscall-tp-fields.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 2a139d2781a8..5523cf4e9321 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -120,7 +120,10 @@ static int test__syscall_openat_tp_fields(struct test_suite *test __maybe_unused tp_flags = evsel__intval(evsel, &sample, "flags"); perf_sample__exit(&sample); - if (flags != tp_flags) { + /* C library wrapper may set additional flags, + access mode must be unchanged */ + if ((tp_flags & O_ACCMODE) != (flags & O_ACCMODE) || + (tp_flags & flags) != flags) { pr_debug("%s: Expected flags=%#x, got %#x\n", __func__, flags, tp_flags); goto out_delete_evlist; |
