diff options
author | Michael Pratt <mpratt@google.com> | 2019-06-19 14:47:01 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-19 14:48:18 -0700 |
commit | 773423a997eb19c48942ccb8a390be72bbd9d5e1 (patch) | |
tree | 5964bb66eb2c19e807542e068f74907f5c0debfb | |
parent | 9d2efaac5af3618a637abe2dba23f63387dd086e (diff) |
Abort loop on failure
As-is, on failure these will infinite loop, resulting in test timeout
instead of failure.
PiperOrigin-RevId: 254074989
-rw-r--r-- | test/syscalls/linux/tcp_socket.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/syscalls/linux/tcp_socket.cc b/test/syscalls/linux/tcp_socket.cc index e95b644ac..5efeb96c8 100644 --- a/test/syscalls/linux/tcp_socket.cc +++ b/test/syscalls/linux/tcp_socket.cc @@ -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; } |