Skip to content

Commit

Permalink
test: skip ptrace if SINGLESTEP is not supported
Browse files Browse the repository at this point in the history
On armv7hl the PTRACE_SINGLESTEP call is no longer supported. Make sure
we skip the test in this case.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
  • Loading branch information
David Herrmann committed Aug 2, 2018
1 parent dd309a5 commit bf627e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test-parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ static int test_parallel(void) {

/* step child */
r = ptrace(PTRACE_SINGLESTEP, pid, 0, 0);

/*
* Some architectures (e.g., armv7hl) do not implement
* SINGLESTEP, but return EIO. Skip the entire test in
* this case.
*/
if (r < 0 && errno == EIO)
return 77;

assert(r >= 0);
break;

Expand Down

0 comments on commit bf627e0

Please sign in to comment.