diff options
author | Bin Lu <bin.lu@arm.com> | 2020-05-27 05:21:33 -0400 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-05-28 04:28:06 -0400 |
commit | 744e8d6e4311f0aef47215a227b0eef582034cfd (patch) | |
tree | 487836ae5a7a5cdb0d18f5a0a78c708c65944079 /test | |
parent | 8e2c5d951ea04f47ad1d37bab196a99fc56f5521 (diff) |
minor changes in exec_binary test case for Arm64
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/exec_binary.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syscalls/linux/exec_binary.cc b/test/syscalls/linux/exec_binary.cc index 1a9f203b9..18d2f22c1 100644 --- a/test/syscalls/linux/exec_binary.cc +++ b/test/syscalls/linux/exec_binary.cc @@ -438,7 +438,12 @@ TEST(ElfTest, MissingText) { ASSERT_THAT(RetryEINTR(waitpid)(child, &status, 0), SyscallSucceedsWithValue(child)); // It runs off the end of the zeroes filling the end of the page. +#if defined(__x86_64__) EXPECT_TRUE(WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) << status; +#elif defined(__aarch64__) + // 0 is an invalid instruction opcode on arm64. + EXPECT_TRUE(WIFSIGNALED(status) && WTERMSIG(status) == SIGILL) << status; +#endif } // Typical ELF with a data + bss segment |