Skip to content

Commit

Permalink
fix(test/drivers): disable some checks in clone/fork related tests on…
Browse files Browse the repository at this point in the history
… ppc64, where a pagefault happens.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Andrea Terzolo <andreaterzolo3@gmail.com>
  • Loading branch information
2 people authored and poiana committed Apr 23, 2024
1 parent 1ce890a commit 3793b10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions test/drivers/test_suites/syscall_exit_suite/clone3_x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,13 @@ TEST(SyscallExit, clone3X_child)
evt_test->assert_numeric_param(1, (int64_t)0);

/* Parameter 2: exe (type: PT_CHARBUF) */
#ifndef __powerpc64__ // Page faults
evt_test->assert_charbuf_param(2, info.args[0]);

/* Parameter 3: args (type: PT_CHARBUFARRAY) */
/* Starting from `1` because the first is `exe`. */
evt_test->assert_charbuf_array_param(3, &info.args[1]);
#endif

/* Parameter 4: tid (type: PT_PID) */
evt_test->assert_numeric_param(4, (int64_t)ret_pid);
Expand All @@ -235,7 +237,9 @@ TEST(SyscallExit, clone3X_child)
evt_test->assert_cgroup_param(15);

/* Parameter 16: flags (type: PT_FLAGS32) */
#ifndef __powerpc64__ // Page faults
evt_test->assert_numeric_param(16, (uint32_t)PPM_CL_CLONE_FILES);
#endif

/* Parameter 21: pid_namespace init task start_time monotonic time in ns (type: PT_UINT64) */
evt_test->assert_numeric_param(21, (uint64_t)0, GREATER_EQUAL);
Expand Down Expand Up @@ -452,8 +456,9 @@ TEST(SyscallExit, clone3X_child_clone_parent_flag)
evt_test->assert_numeric_param(6, (int64_t)::gettid());

/* Parameter 16: flags (type: PT_FLAGS32) */
#ifndef __powerpc64__ // Page fault
evt_test->assert_numeric_param(16, (uint32_t)PPM_CL_CLONE_PARENT);

#endif
/* Parameter 19: vtid (type: PT_PID) */
evt_test->assert_numeric_param(19, (int64_t)p2_t1);

Expand Down Expand Up @@ -535,8 +540,9 @@ TEST(SyscallExit, clone3X_child_new_namespace_from_child)
evt_test->assert_numeric_param(6, (int64_t)::gettid());

/* Parameter 16: flags (type: PT_FLAGS32) */
#ifndef __powerpc64__ // Page fault
evt_test->assert_numeric_param(16, (uint32_t)PPM_CL_CLONE_NEWPID | PPM_CL_CHILD_IN_PIDNS);

#endif
/* Parameter 19: vtid (type: PT_PID) */
evt_test->assert_numeric_param(19, (int64_t)p1_t1[0]);

Expand Down
3 changes: 2 additions & 1 deletion test/drivers/test_suites/syscall_exit_suite/clone_x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,13 @@ TEST(SyscallExit, cloneX_child)
evt_test->assert_numeric_param(1, (int64_t)0);

/* Parameter 2: exe (type: PT_CHARBUF) */
#ifndef __powerpc64__ // Page fault
evt_test->assert_charbuf_param(2, info.args[0]);

/* Parameter 3: args (type: PT_CHARBUFARRAY) */
/* Starting from `1` because the first is `exe`. */
evt_test->assert_charbuf_array_param(3, &info.args[1]);

#endif
/* Parameter 4: tid (type: PT_PID) */
evt_test->assert_numeric_param(4, (int64_t)ret_pid);

Expand Down
3 changes: 2 additions & 1 deletion test/drivers/test_suites/syscall_exit_suite/fork_x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,13 @@ TEST(SyscallExit, forkX_child)
evt_test->assert_numeric_param(1, (int64_t)0);

/* Parameter 2: exe (type: PT_CHARBUF) */
#ifndef __powerpc64__ // Page fault
evt_test->assert_charbuf_param(2, info.args[0]);

/* Parameter 3: args (type: PT_CHARBUFARRAY) */
/* Starting from `1` because the first is `exe`. */
evt_test->assert_charbuf_array_param(3, &info.args[1]);

#endif
/* Parameter 4: tid (type: PT_PID) */
evt_test->assert_numeric_param(4, (int64_t)ret_pid);

Expand Down

0 comments on commit 3793b10

Please sign in to comment.