From 4fa7769f76e1f315cb5ec181074e0076ba904fa3 Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Mon, 4 Dec 2023 18:09:10 +0100 Subject: [PATCH] fix(test): correct socketcall SYS_ACCEPT failures on s390x The modern BPF driver maps the SYS_ACCEPT to SYS_ACCEPT4 which is being tested in the socketcall SYS_ACCEPT tests. The kmod and bpf drivers do not switch directly but rather ensure to use the PPM event instead of syscall. The socketcall SYS_ACCEPT tests contain a specific handling for kmod. Enable this handling to also for the bpf driver. Signed-off-by: Hendrik Brueckner --- .../syscall_exit_suite/socketcall_x.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/drivers/test_suites/syscall_exit_suite/socketcall_x.cpp b/test/drivers/test_suites/syscall_exit_suite/socketcall_x.cpp index 1f66eea4ddc..0f9654d70fa 100644 --- a/test/drivers/test_suites/syscall_exit_suite/socketcall_x.cpp +++ b/test/drivers/test_suites/syscall_exit_suite/socketcall_x.cpp @@ -346,8 +346,8 @@ TEST(SyscallExit, socketcall_acceptX_INET) { #ifdef __s390x__ auto evt_test = get_syscall_event_test(__NR_accept4, EXIT_EVENT); - /* The kmod can correctly handle accept also on s390x */ - if(evt_test->is_kmod_engine()) + /* The kmod/bpf can correctly handle accept also on s390x */ + if(evt_test->is_kmod_engine() || evt_test->is_bpf_engine()) { /* we cannot set `__NR_accept` explicitly since it is not defined on s390x * we activate all syscalls. @@ -429,8 +429,8 @@ TEST(SyscallExit, socketcall_acceptX_INET6) { #ifdef __s390x__ auto evt_test = get_syscall_event_test(__NR_accept4, EXIT_EVENT); - /* The kmod can correctly handle accept also on s390x */ - if(evt_test->is_kmod_engine()) + /* The kmod/bpf can correctly handle accept also on s390x */ + if(evt_test->is_kmod_engine() || evt_test->is_bpf_engine()) { /* we cannot set `__NR_accept` explicitly since it is not defined on s390x * we activate all syscalls. @@ -513,8 +513,8 @@ TEST(SyscallExit, socketcall_acceptX_UNIX) { #ifdef __s390x__ auto evt_test = get_syscall_event_test(__NR_accept4, EXIT_EVENT); - /* The kmod can correctly handle accept also on s390x */ - if(evt_test->is_kmod_engine()) + /* The kmod/bpf can correctly handle accept also on s390x */ + if(evt_test->is_kmod_engine() || evt_test->is_bpf_engine()) { /* we cannot set `__NR_accept` explicitly since it is not defined on s390x * we activate all syscalls. @@ -599,8 +599,8 @@ TEST(SyscallExit, socketcall_acceptX_failure) { #ifdef __s390x__ auto evt_test = get_syscall_event_test(__NR_accept4, EXIT_EVENT); - /* The kmod can correctly handle accept also on s390x */ - if(evt_test->is_kmod_engine()) + /* The kmod/bpf can correctly handle accept also on s390x */ + if(evt_test->is_kmod_engine() || evt_test->is_bpf_engine()) { /* we cannot set `__NR_accept` explicitly since it is not defined on s390x * we activate all syscalls.