From 744e8d6e4311f0aef47215a227b0eef582034cfd Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Wed, 27 May 2020 05:21:33 -0400 Subject: minor changes in exec_binary test case for Arm64 Signed-off-by: Bin Lu --- test/syscalls/linux/exec_binary.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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 -- cgit v1.2.3