mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Use return values from syscalls in eventfd tests.
PiperOrigin-RevId: 253890611
This commit is contained in:
committed by
gVisor bot
parent
0e07c94d54
commit
546b2948cb
@@ -53,9 +53,9 @@ TEST(EventfdTest, Nonblock) {
|
||||
void* read_three_times(void* arg) {
|
||||
int efd = *reinterpret_cast<int*>(arg);
|
||||
uint64_t l;
|
||||
read(efd, &l, sizeof(l));
|
||||
read(efd, &l, sizeof(l));
|
||||
read(efd, &l, sizeof(l));
|
||||
EXPECT_THAT(read(efd, &l, sizeof(l)), SyscallSucceedsWithValue(sizeof(l)));
|
||||
EXPECT_THAT(read(efd, &l, sizeof(l)), SyscallSucceedsWithValue(sizeof(l)));
|
||||
EXPECT_THAT(read(efd, &l, sizeof(l)), SyscallSucceedsWithValue(sizeof(l)));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,8 @@ TEST(EventfdTest, NotifyNonZero_NoRandomSave) {
|
||||
ScopedThread t([&efd] {
|
||||
sleep(5);
|
||||
uint64_t val = 1;
|
||||
write(efd.get(), &val, sizeof(val));
|
||||
EXPECT_THAT(write(efd.get(), &val, sizeof(val)),
|
||||
SyscallSucceedsWithValue(sizeof(val)));
|
||||
});
|
||||
|
||||
// epoll_wait should return once the thread writes.
|
||||
|
||||
Reference in New Issue
Block a user