Skip to content

Commit 269a354

Browse files
committed
Add Go 1.24 to the grpc, http2 and go tls trace BPF tests
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 84ba721 commit 269a354

9 files changed

Lines changed: 207 additions & 4 deletions

File tree

bazel/pl_build_system.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
2323
load("@rules_python//python:defs.bzl", "py_test")
2424
load("//bazel:toolchain_transitions.bzl", "qemu_interactive_runner")
2525

26-
pl_boringcrypto_go_sdk = ["1.23.5"]
27-
pl_supported_go_sdk_versions = ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23"]
26+
pl_boringcrypto_go_sdk = ["1.23.9"]
27+
pl_supported_go_sdk_versions = ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23", "1.24"]
2828

2929
# The last version in this list corresponds to the boringcrypto go sdk version.
3030
pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk

src/stirling/source_connectors/socket_tracer/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,15 @@ pl_cc_bpf_test(
310310
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_21_grpc_client",
311311
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_22_grpc_client",
312312
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_23_grpc_client",
313+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_1_24_grpc_client",
313314
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client:golang_boringcrypto_grpc_client",
314315
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_18_grpc_server_with_certs",
315316
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_19_grpc_server_with_certs",
316317
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_20_grpc_server_with_certs",
317318
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_21_grpc_server_with_certs",
318319
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_22_grpc_server_with_certs",
319320
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_23_grpc_server_with_certs",
321+
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_1_24_grpc_server_with_certs",
320322
"//src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server:golang_boringcrypto_grpc_server_with_certs",
321323
],
322324
flaky = True,
@@ -364,6 +366,8 @@ pl_cc_bpf_test(
364366
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_grpc_server_container",
365367
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_client_container",
366368
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_server_container",
369+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_client_container",
370+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_server_container",
367371
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_client_container",
368372
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_server_container",
369373
"//src/stirling/source_connectors/socket_tracer/testing/container_images:product_catalog_client_container",
@@ -586,6 +590,8 @@ pl_cc_bpf_test(
586590
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_tls_server_container",
587591
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_client_container",
588592
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_server_container",
593+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_client_container",
594+
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_server_container",
589595
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_client_container",
590596
"//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_server_container",
591597
"//src/stirling/testing:cc_library",

src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h"
3333
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h"
3434
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h"
35+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h"
36+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h"
3537
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h"
3638
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h"
3739
#include "src/stirling/source_connectors/socket_tracer/testing/protocol_checkers.h"
@@ -101,6 +103,11 @@ struct Go1_23TLSClientServerContainers {
101103
using GoTLSClientContainer = ::px::stirling::testing::Go1_23_TLSClientContainer;
102104
};
103105

106+
struct Go1_24TLSClientServerContainers {
107+
using GoTLSServerContainer = ::px::stirling::testing::Go1_24_TLSServerContainer;
108+
using GoTLSClientContainer = ::px::stirling::testing::Go1_24_TLSClientContainer;
109+
};
110+
104111
struct GoBoringCryptoTLSClientServerContainers {
105112
using GoTLSServerContainer = ::px::stirling::testing::GoBoringCryptoTLSServerContainer;
106113
using GoTLSClientContainer = ::px::stirling::testing::GoBoringCryptoTLSClientContainer;
@@ -109,7 +116,7 @@ struct GoBoringCryptoTLSClientServerContainers {
109116
typedef ::testing::Types<GoBoringCryptoTLSClientServerContainers, Go1_18TLSClientServerContainers,
110117
Go1_19TLSClientServerContainers, Go1_20TLSClientServerContainers,
111118
Go1_21TLSClientServerContainers, Go1_22TLSClientServerContainers,
112-
Go1_23TLSClientServerContainers>
119+
Go1_23TLSClientServerContainers, Go1_24TLSClientServerContainers>
113120
GoVersions;
114121
TYPED_TEST_SUITE(GoTLSTraceTest, GoVersions);
115122

src/stirling/source_connectors/socket_tracer/grpc_trace_bpf_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ INSTANTIATE_TEST_SUITE_P(SecurityModeTest, GRPCTraceTest,
196196
TestParams{"1_21", true, true}, TestParams{"1_21", true, false},
197197
TestParams{"1_22", true, true}, TestParams{"1_22", true, false},
198198
TestParams{"1_23", true, true}, TestParams{"1_23", true, false},
199+
TestParams{"1_24", true, true}, TestParams{"1_24", true, false},
199200
TestParams{"boringcrypto", true, true}));
200201

201202
class PyGRPCTraceTest : public testing::SocketTraceBPFTestFixture</* TClientSideTracing */ false> {

src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h"
3434
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h"
3535
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h"
36+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h"
37+
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h"
3638
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h"
3739
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h"
3840
#include "src/stirling/source_connectors/socket_tracer/testing/container_images/product_catalog_client_container.h"
@@ -105,6 +107,11 @@ struct Go1_23GRPCClientServerContainers {
105107
using ClientContainer = ::px::stirling::testing::Go1_23_GRPCClientContainer;
106108
};
107109

110+
struct Go1_24GRPCClientServerContainers {
111+
using ServerContainer = ::px::stirling::testing::Go1_24_GRPCServerContainer;
112+
using ClientContainer = ::px::stirling::testing::Go1_24_GRPCClientContainer;
113+
};
114+
108115
struct GoBoringCryptoGRPCClientServerContainers {
109116
using ServerContainer = ::px::stirling::testing::GoBoringCryptoGRPCServerContainer;
110117
using ClientContainer = ::px::stirling::testing::GoBoringCryptoGRPCClientContainer;
@@ -113,7 +120,7 @@ struct GoBoringCryptoGRPCClientServerContainers {
113120
typedef ::testing::Types<GoBoringCryptoGRPCClientServerContainers, Go1_18GRPCClientServerContainers,
114121
Go1_19GRPCClientServerContainers, Go1_20GRPCClientServerContainers,
115122
Go1_21GRPCClientServerContainers, Go1_22GRPCClientServerContainers,
116-
Go1_23GRPCClientServerContainers>
123+
Go1_23GRPCClientServerContainers, Go1_24GRPCClientServerContainers>
117124
GoVersions;
118125
TYPED_TEST_SUITE(HTTP2TraceTest, GoVersions);
119126

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2018- The Pixie Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
19+
#pragma once
20+
21+
#include <string>
22+
23+
#include "src/common/testing/test_environment.h"
24+
#include "src/common/testing/test_utils/container_runner.h"
25+
26+
namespace px {
27+
namespace stirling {
28+
namespace testing {
29+
30+
class Go1_24_GRPCClientContainer : public ContainerRunner {
31+
public:
32+
Go1_24_GRPCClientContainer()
33+
: ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix,
34+
kReadyMessage) {}
35+
36+
private:
37+
static constexpr std::string_view kBazelImageTar =
38+
"src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_1_24_grpc_tls_client.tar";
39+
static constexpr std::string_view kContainerNamePrefix = "grpc_client";
40+
static constexpr std::string_view kReadyMessage = "";
41+
};
42+
43+
} // namespace testing
44+
} // namespace stirling
45+
} // namespace px
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2018- The Pixie Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
19+
#pragma once
20+
21+
#include <string>
22+
23+
#include "src/common/testing/test_environment.h"
24+
#include "src/common/testing/test_utils/container_runner.h"
25+
26+
namespace px {
27+
namespace stirling {
28+
namespace testing {
29+
30+
class Go1_24_GRPCServerContainer : public ContainerRunner {
31+
public:
32+
Go1_24_GRPCServerContainer()
33+
: ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix,
34+
kReadyMessage) {}
35+
36+
static constexpr std::string_view kBazelImageTar =
37+
"src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server.tar";
38+
39+
private:
40+
static constexpr std::string_view kContainerNamePrefix = "grpc_server";
41+
static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server";
42+
};
43+
44+
} // namespace testing
45+
} // namespace stirling
46+
} // namespace px
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2018- The Pixie Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
19+
#pragma once
20+
21+
#include <string>
22+
23+
#include "src/common/testing/test_environment.h"
24+
#include "src/common/testing/test_utils/container_runner.h"
25+
26+
namespace px {
27+
namespace stirling {
28+
namespace testing {
29+
30+
class Go1_24_TLSClientContainer : public ContainerRunner {
31+
public:
32+
Go1_24_TLSClientContainer()
33+
: ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix,
34+
kReadyMessage) {}
35+
36+
private:
37+
static constexpr std::string_view kBazelImageTar =
38+
"src/stirling/testing/demo_apps/go_https/client/golang_1_24_https_client.tar";
39+
static constexpr std::string_view kContainerNamePrefix = "https_client";
40+
static constexpr std::string_view kReadyMessage = R"({"status":"ok"})";
41+
};
42+
43+
} // namespace testing
44+
} // namespace stirling
45+
} // namespace px
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2018- The Pixie Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
*/
18+
19+
#pragma once
20+
21+
#include <string>
22+
23+
#include "src/common/testing/test_environment.h"
24+
#include "src/common/testing/test_utils/container_runner.h"
25+
26+
namespace px {
27+
namespace stirling {
28+
namespace testing {
29+
30+
class Go1_24_TLSServerContainer : public ContainerRunner {
31+
public:
32+
Go1_24_TLSServerContainer()
33+
: ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix,
34+
kReadyMessage) {}
35+
36+
static constexpr std::string_view kBazelImageTar =
37+
"src/stirling/testing/demo_apps/go_https/server/golang_1_24_https_server.tar";
38+
39+
private:
40+
static constexpr std::string_view kContainerNamePrefix = "https_server";
41+
static constexpr std::string_view kReadyMessage = "Starting HTTPS service";
42+
};
43+
44+
} // namespace testing
45+
} // namespace stirling
46+
} // namespace px

0 commit comments

Comments
 (0)