From e7b2023647df994736ccaaa99a66a8712db2c631 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Mon, 5 Apr 2021 12:34:12 -0700 Subject: deflake semaphore test There's no reason to actually increment the semaphore, it just introduces the chance of a race. PiperOrigin-RevId: 366851795 --- test/syscalls/linux/semaphore.cc | 8 -------- 1 file changed, 8 deletions(-) (limited to 'test/syscalls') diff --git a/test/syscalls/linux/semaphore.cc b/test/syscalls/linux/semaphore.cc index 28f51a3bf..8c5732147 100644 --- a/test/syscalls/linux/semaphore.cc +++ b/test/syscalls/linux/semaphore.cc @@ -234,14 +234,6 @@ TEST(SemaphoreTest, SemTimedOpBlock) { AutoSem sem(semget(IPC_PRIVATE, 1, 0600 | IPC_CREAT)); ASSERT_THAT(sem.get(), SyscallSucceeds()); - ScopedThread th([&sem] { - absl::SleepFor(absl::Milliseconds(100)); - - struct sembuf buf = {}; - buf.sem_op = 1; - ASSERT_THAT(RetryEINTR(semop)(sem.get(), &buf, 1), SyscallSucceeds()); - }); - struct sembuf buf = {}; buf.sem_op = -1; struct timespec timeout = {}; -- cgit v1.2.3