diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-21 16:32:49 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-21 16:32:49 -0800 |
commit | 45a8edbd5ae6c836317923dc7d2b5baac9feea98 (patch) | |
tree | c8e011c89c1808fe2e520ee41c9bcb2af7911cd0 /test/syscalls/linux/seccomp.cc | |
parent | b3405a719cbb33dac2deced192209a5584e5e3d6 (diff) | |
parent | 200cf245c4ed43d8e2a37484cdbc36f5fbfa1ac9 (diff) |
Merge pull request #1492 from majek:err_typo_in_netstack_tests
PiperOrigin-RevId: 290840370
Diffstat (limited to 'test/syscalls/linux/seccomp.cc')
-rw-r--r-- | test/syscalls/linux/seccomp.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/syscalls/linux/seccomp.cc b/test/syscalls/linux/seccomp.cc index 7e41fe7d8..7a2c1191a 100644 --- a/test/syscalls/linux/seccomp.cc +++ b/test/syscalls/linux/seccomp.cc @@ -49,12 +49,12 @@ namespace testing { namespace { // A syscall not implemented by Linux that we don't expect to be called. -constexpr uint32_t kFilteredSyscall = SYS_vserver; +constexpr uint32 kFilteredSyscall = SYS_vserver; // Applies a seccomp-bpf filter that returns `filtered_result` for // `sysno` and allows all other syscalls. Async-signal-safe. -void ApplySeccompFilter(uint32_t sysno, uint32_t filtered_result, - uint32_t flags = 0) { +void ApplySeccompFilter(uint32 sysno, uint32 filtered_result, + uint32 flags = 0) { // "Prior to [PR_SET_SECCOMP], the task must call prctl(PR_SET_NO_NEW_PRIVS, // 1) or run with CAP_SYS_ADMIN privileges in its namespace." - // Documentation/prctl/seccomp_filter.txt @@ -162,7 +162,7 @@ TEST(SeccompTest, RetKillOnlyKillsOneThread) { TEST(SeccompTest, RetTrapCausesSIGSYS) { pid_t const pid = fork(); if (pid == 0) { - constexpr uint16_t kTrapValue = 0xdead; + constexpr uint16 kTrapValue = 0xdead; RegisterSignalHandler( SIGSYS, +[](int signo, siginfo_t* info, void* ucv) { ucontext_t* uc = static_cast<ucontext_t*>(ucv); @@ -191,7 +191,7 @@ TEST(SeccompTest, RetTrapCausesSIGSYS) { #ifdef __x86_64__ -constexpr uint64_t kVsyscallTimeEntry = 0xffffffffff600400; +constexpr uint64 kVsyscallTimeEntry = 0xffffffffff600400; time_t vsyscall_time(time_t* t) { return reinterpret_cast<time_t (*)(time_t*)>(kVsyscallTimeEntry)(t); @@ -202,7 +202,7 @@ TEST(SeccompTest, SeccompAppliesToVsyscall) { pid_t const pid = fork(); if (pid == 0) { - constexpr uint16_t kTrapValue = 0xdead; + constexpr uint16 kTrapValue = 0xdead; RegisterSignalHandler( SIGSYS, +[](int signo, siginfo_t* info, void* ucv) { ucontext_t* uc = static_cast<ucontext_t*>(ucv); @@ -335,7 +335,7 @@ TEST(SeccompTest, TsyncAppliesToAllThreads) { // This test will validate that seccomp(2) rejects unsupported flags. TEST(SeccompTest, SeccompRejectsUnknownFlags) { - constexpr uint32_t kInvalidFlag = 123; + constexpr uint32 kInvalidFlag = 123; ASSERT_THAT( syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, kInvalidFlag, nullptr), SyscallFailsWithErrno(EINVAL)); |