Skip to content

Commit

Permalink
i#4474: Port client.nudge_ex test to AARCH64
Browse files Browse the repository at this point in the history
Port client.nudge_ex test to AARCH64.

Issue: #4474
  • Loading branch information
philramsey-arm committed Jul 4, 2024
1 parent 628314d commit 9d8a88e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3470,10 +3470,10 @@ if (X86)
endif ()
endif ()

if (X86) # FIXME i#1551, i#1569: fix bugs on ARM and AArch64
if (X86 OR AARCH64) # FIXME i#1551: fix bugs on ARM
tobuild_ci(client.nudge_ex client-interface/nudge_ex.c "" "" "")
use_DynamoRIO_extension(client.nudge_ex.dll drmgr)
endif (X86)
endif (X86 OR AARCH64)

tobuild_ci(client.app_args client-interface/app_args.c "" "" "Test;Test2;Test3")

Expand Down
8 changes: 7 additions & 1 deletion suite/tests/client-interface/nudge_ex.dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ static bool sent_self;

static process_id_t child_pid;

#ifdef SYS_fork
static const int SYS_FORK_VALUE = SYS_fork;
#else
static const int SYS_FORK_VALUE = -1; /* Make sure the comparison fails*/
#endif

typedef struct {
ptr_int_t saved_param;
process_id_t child_pid;
Expand Down Expand Up @@ -158,7 +164,7 @@ event_post_syscall(void *drcontext, int sysnum)
per_thread_t *data = (per_thread_t *)drmgr_get_cls_field(drcontext, cls_idx);
/* XXX i#752: should DR provide a child creation event that gives us the pid? */
#ifdef UNIX
if (sysnum == SYS_fork
if (sysnum == SYS_FORK_VALUE
# ifdef LINUX
|| (sysnum == SYS_clone && !TEST(CLONE_VM, data->saved_param))
# endif
Expand Down

0 comments on commit 9d8a88e

Please sign in to comment.