diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2015-04-16 16:52:53 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-29 18:43:41 +0300 |
commit | 43f322b4ab3f203d8eefbdad6e58e1637221e4a7 (patch) | |
tree | bec98764c8084937c6bbb5a6c4f8469b7f03d8b8 /tools/perf/tests/open-syscall-tp-fields.c | |
parent | 3237f28188c3e41a938781a369652772a23e97a9 (diff) | |
download | linux-43f322b4ab3f203d8eefbdad6e58e1637221e4a7.tar.xz |
perf tests: Switch from open to openat
Multiple perf tests fail on arm64 due to missing open syscall:
2: detect open syscall event : FAILED!
open(2) is a legacy syscall, replaced with openat(2) since 2.6.16. Thus
new architectures in kernel, such as arm64, don't implement these legacy
syscalls.
The patch replaces all sys_enter_open events with sys_enter_openat,
renames the related tests and test output to avoid confusion.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429192375-13706-2-git-send-email-riku.voipio@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/open-syscall-tp-fields.c')
-rw-r--r-- | tools/perf/tests/open-syscall-tp-fields.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c index 127dcae0b760..6245221479d7 100644 --- a/tools/perf/tests/open-syscall-tp-fields.c +++ b/tools/perf/tests/open-syscall-tp-fields.c @@ -5,7 +5,7 @@ #include "tests.h" #include "debug.h" -int test__syscall_open_tp_fields(void) +int test__syscall_openat_tp_fields(void) { struct record_opts opts = { .target = { @@ -29,7 +29,7 @@ int test__syscall_open_tp_fields(void) goto out; } - evsel = perf_evsel__newtp("syscalls", "sys_enter_open"); + evsel = perf_evsel__newtp("syscalls", "sys_enter_openat"); if (evsel == NULL) { pr_debug("%s: perf_evsel__newtp\n", __func__); goto out_delete_evlist; @@ -66,7 +66,7 @@ int test__syscall_open_tp_fields(void) /* * Generate the event: */ - open(filename, flags); + openat(AT_FDCWD, filename, flags); while (1) { int before = nr_events; |