Skip to content

Commit

Permalink
test: skip unsupported and incompatible tests with io_uring enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Xie Zhihao <zhihao.xie@intel.com>
  • Loading branch information
zhxie committed Jul 24, 2023
1 parent a998995 commit 76f0985
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 44 deletions.
7 changes: 7 additions & 0 deletions test/integration/buffer_accounting_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ class Http2BufferWatermarksTest
setUpstreamProtocol(protocol_test_params.upstream_protocol);
}

void SetUp() override {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
}

protected:
// For testing purposes, track >= 4096B accounts.
std::shared_ptr<Buffer::TrackedWatermarkBufferFactory> buffer_factory_;
Expand Down
7 changes: 7 additions & 0 deletions test/integration/http2_flood_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ class Http2FloodMitigationTest
deferredProcessing(GetParam()) ? "true" : "false");
}

void SetUp() override {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
}

protected:
void initializeUpstreamFloodTest();
std::vector<char> serializeFrames(const Http2Frame& frame, uint32_t num_frames);
Expand Down
27 changes: 16 additions & 11 deletions test/integration/multiplexed_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1239,12 +1239,11 @@ TEST_P(MultiplexedIntegrationTest, IdleTimeoutWithSimultaneousRequests) {

// Test request mirroring / shadowing with an HTTP/2 downstream and a request with a body.
TEST_P(MultiplexedIntegrationTest, RequestMirrorWithBody) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// It is caused by connection order behavior in tests.
// TODO(zhxie): io_uring works asynchronously and the connection may not come in a sequence as
// expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

config_helper_.addConfigModifier(
[&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager&
Expand Down Expand Up @@ -2293,13 +2292,12 @@ TEST_P(MultiplexedIntegrationTest, Reset101SwitchProtocolResponse) {
}

TEST_P(MultiplexedIntegrationTest, PerTryTimeoutWhileDownstreamStopsReading) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// It is caused by connection buffer never touch high watermark since the activate write file
// events of server socket will get handled in the end of the on read of client socket.
// TODO(zhxie): io_uring socket is not compatible with watermark. It is caused by connection
// buffer never touch high watermark since the activate write file events of server socket will
// get handled in the end of the on read of client socket.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

if (downstreamProtocol() != Http::CodecType::HTTP2) {
return;
Expand Down Expand Up @@ -2427,6 +2425,13 @@ class SocketSwappableMultiplexedIntegrationTest : public SocketInterfaceSwap,
: SocketInterfaceSwap(GetParam().downstream_protocol == Http::CodecType::HTTP3
? Network::Socket::Type::Datagram
: Network::Socket::Type::Stream) {}

void SetUp() override {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
}
};

INSTANTIATE_TEST_SUITE_P(IpVersions, SocketSwappableMultiplexedIntegrationTest,
Expand Down
17 changes: 12 additions & 5 deletions test/integration/protocol_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2840,12 +2840,11 @@ TEST_P(DownstreamProtocolIntegrationTest, ConnDurationTimeoutNoHttpRequest) {
}

TEST_P(DownstreamProtocolIntegrationTest, TestPreconnect) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// It is caused by connection order behavior in tests.
// TODO(zhxie): io_uring works asynchronously and the connection may not come in a sequence as
// expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
auto* cluster = bootstrap.mutable_static_resources()->mutable_clusters(0);
Expand Down Expand Up @@ -4289,6 +4288,10 @@ class NoUdpGso : public Api::OsSysCallsImpl {
};

TEST_P(DownstreamProtocolIntegrationTest, HandleDownstreamSocketFail) {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
// Make sure for HTTP/3 Envoy will use sendmsg, so the write_matcher will work.
NoUdpGso reject_gso_;
TestThreadsafeSingletonInjector<Api::OsSysCallsImpl> os_calls{&reject_gso_};
Expand Down Expand Up @@ -4329,6 +4332,10 @@ TEST_P(DownstreamProtocolIntegrationTest, HandleDownstreamSocketFail) {
}

TEST_P(ProtocolIntegrationTest, HandleUpstreamSocketFail) {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
SocketInterfaceSwap socket_swap(upstreamProtocol() == Http::CodecType::HTTP3
? Network::Socket::Type::Datagram
: Network::Socket::Type::Stream);
Expand Down
7 changes: 7 additions & 0 deletions test/integration/shadow_policy_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class ShadowPolicyIntegrationTest
setUpstreamCount(2);
}

void SetUp() override {
// TODO(zhxie): io_uring is not compatible with SocketInterfaceSwap.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif
}

// Adds a mirror policy that routes to cluster_header or cluster_name, in that order. Additionally
// optionally registers an upstream filter on the cluster specified by
// cluster_with_custom_filter_.
Expand Down
31 changes: 13 additions & 18 deletions test/integration/tcp_proxy_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,10 @@ TEST_P(TcpProxyIntegrationTest, TcpProxyLargeWrite) {

// Test that a downstream flush works correctly (all data is flushed)
TEST_P(TcpProxyIntegrationTest, TcpProxyDownstreamFlush) {

// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// TODO(zhxie): io_uring works asynchronously and the counter may not reach the value expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Use a very large size to make sure it is larger than the kernel socket read buffer.
const uint32_t size = 50 * 1024 * 1024;
Expand Down Expand Up @@ -320,11 +318,10 @@ TEST_P(TcpProxyIntegrationTest, TcpProxyDownstreamFlush) {

// Test that an upstream flush works correctly (all data is flushed)
TEST_P(TcpProxyIntegrationTest, TcpProxyUpstreamFlush) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// TODO(zhxie): io_uring works asynchronously and the counter may not reach the value expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Use a very large size to make sure it is larger than the kernel socket read buffer.
const uint32_t size = 50 * 1024 * 1024;
Expand Down Expand Up @@ -357,11 +354,10 @@ TEST_P(TcpProxyIntegrationTest, TcpProxyUpstreamFlush) {

// Test that Envoy doesn't crash or assert when shutting down with an upstream flush active
TEST_P(TcpProxyIntegrationTest, TcpProxyUpstreamFlushEnvoyExit) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// TODO(zhxie): io_uring works asynchronously and the counter may not reach the value expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Use a very large size to make sure it is larger than the kernel socket read buffer.
const uint32_t size = 50 * 1024 * 1024;
Expand Down Expand Up @@ -1617,12 +1613,11 @@ TEST_P(MysqlIntegrationTest, UpstreamWritesFirst) {
// Early close notification does not work for OSX
#if !defined(__APPLE__)
TEST_P(MysqlIntegrationTest, DisconnectDetected) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// It is caused by connection order behavior in tests.
// TODO(zhxie): io_uring works asynchronously and the connection may not come in a sequence as
// expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Switch to per-upstream preconnect.
perUpstreamPreconnect();
Expand Down
17 changes: 7 additions & 10 deletions test/integration/tcp_tunneling_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,11 @@ TEST_P(ConnectTerminationIntegrationTest, ExtendedConnectWithBytestreamProtocol)
}

TEST_P(ConnectTerminationIntegrationTest, Basic) {
// TODO (soulxu): skip this test for io-uring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// It is caused by connection order behavior in tests.
// TODO(zhxie): io_uring works asynchronously and the connection may not come in a sequence as
// expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Regression test upstream connection establishment before connect termination.
config_helper_.addConfigModifier([&](envoy::config::bootstrap::v3::Bootstrap& bootstrap) -> void {
Expand Down Expand Up @@ -1407,12 +1406,10 @@ TEST_P(TcpTunnelingIntegrationTest, TestIdletimeoutWithLargeOutstandingData) {

// Test that a downstream flush works correctly (all data is flushed)
TEST_P(TcpTunnelingIntegrationTest, TcpProxyDownstreamFlush) {

// TODO (soulxu): skip this test for inuring, since this test depends on the io behavior.
// After we enable the parameter test for io-uring and
// default socket, then we should run this test for default socket, and write another version for
// the io-uring.
// TODO(zhxie): io_uring works asynchronously and the counter may not reach the value expected.
#ifdef ENVOY_TEST_IO_URING
GTEST_SKIP();
#endif

// Use a very large size to make sure it is larger than the kernel socket read buffer.
const uint32_t size = 50 * 1024 * 1024;
Expand Down

0 comments on commit 76f0985

Please sign in to comment.