mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Abort loop on failure
As-is, on failure these will infinite loop, resulting in test timeout instead of failure. PiperOrigin-RevId: 254074989
This commit is contained in:
committed by
gVisor bot
parent
9d2efaac5a
commit
773423a997
@@ -268,7 +268,7 @@ TEST_P(TcpSocketTest, BlockingLargeWrite_NoRandomSave) {
|
||||
char readbuf[2500] = {};
|
||||
int n = -1;
|
||||
while (n != 0) {
|
||||
EXPECT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
ASSERT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
SyscallSucceeds());
|
||||
read_bytes += n;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ TEST_P(TcpSocketTest, BlockingLargeSend_NoRandomSave) {
|
||||
char readbuf[2500] = {};
|
||||
int n = -1;
|
||||
while (n != 0) {
|
||||
EXPECT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
ASSERT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
SyscallSucceeds());
|
||||
read_bytes += n;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user