Skip to content

Commit

Permalink
fix(test/drivers): correct socketcall SYS_ACCEPT failures on s390x
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hbrueckner committed Dec 4, 2023
1 parent 0c4e0bd commit 303a04a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/drivers/test_suites/syscall_enter_suite/socketcall_e.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ TEST(SyscallEnter, socketcall_acceptE)
{
#ifdef __s390x__
auto evt_test = get_syscall_event_test(__NR_accept4, ENTER_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.
Expand Down
16 changes: 8 additions & 8 deletions test/drivers/test_suites/syscall_exit_suite/socketcall_x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 303a04a

Please sign in to comment.