diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-30 16:12:25 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-30 16:12:25 -0800 |
commit | af8f6f83a32f0128abd8bbf3eb6302078e447a7b (patch) | |
tree | c15332205a316f8aa71f1d07b5d5f66a620b025d /test/syscalls/linux/getdents.cc | |
parent | 9988cf2eeff596ce519046d80c54d09166f7d84b (diff) | |
parent | 82ae857877fdf3492f40bca87657a07892c3f59b (diff) |
Merge pull request #1471 from xiaobo55x:syscall_test
PiperOrigin-RevId: 292445329
Diffstat (limited to 'test/syscalls/linux/getdents.cc')
-rw-r--r-- | test/syscalls/linux/getdents.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/syscalls/linux/getdents.cc b/test/syscalls/linux/getdents.cc index ad2dbacb8..b147d6181 100644 --- a/test/syscalls/linux/getdents.cc +++ b/test/syscalls/linux/getdents.cc @@ -228,19 +228,28 @@ class GetdentsTest : public ::testing::Test { // Multiple template parameters are not allowed, so we must use explicit // template specialization to set the syscall number. + +// SYS_getdents isn't defined on arm64. +#ifdef __x86_64__ template <> int GetdentsTest<struct linux_dirent>::SyscallNum() { return SYS_getdents; } +#endif template <> int GetdentsTest<struct linux_dirent64>::SyscallNum() { return SYS_getdents64; } -// Test both legacy getdents and getdents64. +#ifdef __x86_64__ +// Test both legacy getdents and getdents64 on x86_64. typedef ::testing::Types<struct linux_dirent, struct linux_dirent64> GetdentsTypes; +#elif __aarch64__ +// Test only getdents64 on arm64. +typedef ::testing::Types<struct linux_dirent64> GetdentsTypes; +#endif TYPED_TEST_SUITE(GetdentsTest, GetdentsTypes); // N.B. TYPED_TESTs require explicitly using this-> to access members of |