Disable TCP_CORK flaky test with save-resume

Disable the timing related TCP_CORK test as the test expects to not receive
any data when packet size < MSS. But with save-resume, the resume may take
more than cork timeout (200ms) and sends the packet which makes the test fail.

PiperOrigin-RevId: 625378877
This commit is contained in:
Nayana Bidari
2024-04-16 10:36:22 -07:00
committed by gVisor bot
parent 43c2c00c50
commit 2a5cfd87cd
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -2589,6 +2589,7 @@ cc_library(
"socket_ip_tcp_generic.h",
],
deps = select_gtest() + [
"//test/util:save_util",
"//test/util:socket_util",
"//test/util:temp_path",
"//test/util:test_util",
@@ -28,6 +28,7 @@
#include "absl/memory/memory.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "test/util/save_util.h"
#include "test/util/socket_util.h"
#include "test/util/temp_path.h"
#include "test/util/test_util.h"
@@ -417,6 +418,11 @@ TEST_P(TCPSocketPairTest, SetTCPCork) {
}
TEST_P(TCPSocketPairTest, TCPCork) {
// Disable save on this test, this test checks if the data is not recv'd by
// the receiver after enabling TCP_CORK when the size of the packet < MSS.
// But the save/resume may take more than the cork timeout of 200ms causing
// all the corked packets to be sent and makes the test flaky.
const DisableSave ds;
auto sockets = ASSERT_NO_ERRNO_AND_VALUE(NewSocketPair());
EXPECT_THAT(setsockopt(sockets->first_fd(), IPPROTO_TCP, TCP_CORK,