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/semaphore.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/semaphore.cc')
-rw-r--r-- | test/syscalls/linux/semaphore.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/syscalls/linux/semaphore.cc b/test/syscalls/linux/semaphore.cc index e9b131ca9..a9e8a44c1 100644 --- a/test/syscalls/linux/semaphore.cc +++ b/test/syscalls/linux/semaphore.cc @@ -274,7 +274,7 @@ TEST(SemaphoreTest, SemOpRandom) { // Protects the seed below. absl::Mutex mutex; - uint32_t seed = time(nullptr); + uint32 seed = time(nullptr); int count = 0; // Tracks semaphore value. bool done = false; // Tells waiters to stop after signal threads are done. @@ -284,7 +284,7 @@ TEST(SemaphoreTest, SemOpRandom) { for (auto& dec : decs) { dec = absl::make_unique<ScopedThread>([&sem, &mutex, &count, &seed, &done] { for (size_t i = 0; i < 500; ++i) { - int16_t val; + int16 val; { absl::MutexLock l(&mutex); if (done) { @@ -325,7 +325,7 @@ TEST(SemaphoreTest, SemOpRandom) { for (auto& inc : incs) { inc = absl::make_unique<ScopedThread>([&sem, &mutex, &count, &seed] { for (size_t i = 0; i < 500; ++i) { - int16_t val; + int16 val; { absl::MutexLock l(&mutex); val = (rand_r(&seed) % 10 + 1); // Rand between 1 and 10. @@ -415,14 +415,14 @@ TEST(SemaphoreTest, SemCtlValAll) { ASSERT_THAT(sem.get(), SyscallSucceeds()); // Semaphores must start with 0. - uint16_t get[3] = {10, 10, 10}; + uint16 get[3] = {10, 10, 10}; EXPECT_THAT(semctl(sem.get(), 1, GETALL, get), SyscallSucceedsWithValue(0)); for (auto v : get) { EXPECT_EQ(v, 0); } // SetAll and check that they were set. - uint16_t vals[3] = {0, 10, 20}; + uint16 vals[3] = {0, 10, 20}; EXPECT_THAT(semctl(sem.get(), 1, SETALL, vals), SyscallSucceedsWithValue(0)); EXPECT_THAT(semctl(sem.get(), 1, GETALL, get), SyscallSucceedsWithValue(0)); for (size_t i = 0; i < ABSL_ARRAYSIZE(vals); ++i) { |