Commit 856e1416 authored by Omid Azizi's avatar Omid Azizi
Browse files

Fix and Restore BPF tests after Clang-10

Summary:
Fix

lint

Test Plan: Re-enabled tests

Reviewers: yzhao, zasgar, #engineering

Reviewed By: zasgar, #engineering

Differential Revision: https://phab.corp.pixielabs.ai/D5626

GitOrigin-RevId: 2fa247f0939413e7eb9ec26690f244620d7d3c39
parent 5a755842
Showing with 8 additions and 6 deletions
+8 -6
......@@ -231,9 +231,11 @@ static __inline void submit_headers(struct pt_regs* ctx, enum http2_probe_type_t
// TODO(oazizi): Replace this constant with information from DWARF.
const int kSizeOfHeaderField = 40;
#pragma unroll
for (unsigned int i = 0; i < MAX_HEADER_COUNT && i < fields.len; ++i) {
fill_header_field(&event, fields.ptr + i * kSizeOfHeaderField, symaddrs);
go_grpc_header_events.perf_submit(ctx, &event, sizeof(event));
for (unsigned int i = 0; i < MAX_HEADER_COUNT; ++i) {
if (i < fields.len) {
fill_header_field(&event, fields.ptr + i * kSizeOfHeaderField, symaddrs);
go_grpc_header_events.perf_submit(ctx, &event, sizeof(event));
}
}
// If end of stream, send one extra empty header with end-stream flag set.
......
......@@ -209,7 +209,7 @@ class GRPCTraceUprobingTest : public GRPCTraceGoTest, public ::testing::WithPara
};
// TODO(oazizi/yzhao): Looks broken with clang-10.
TEST_P(GRPCTraceUprobingTest, DISABLED_CaptureRPCTraceRecord) {
TEST_P(GRPCTraceUprobingTest, CaptureRPCTraceRecord) {
// Server is launched after initializing socket tracer, which verifies that uprobes
// are dynamically attached.
GRPCTraceGoTest::LaunchServer(GetParam());
......
......@@ -119,7 +119,7 @@ class HTTP2TraceTest : public testing::SocketTraceBPFTest</* TClientSideTracing
};
// TODO(oazizi/yzhao): This test appears broken with clang-10. Please Fix.
TEST_F(HTTP2TraceTest, DISABLED_Basic) {
TEST_F(HTTP2TraceTest, Basic) {
// Run the client in the network of the server, so they can connect to each other.
PL_CHECK_OK(
client_.Run(10, {absl::Substitute("--network=container:$0", server_.container_name())}));
......
......@@ -426,7 +426,7 @@ Status SocketTraceConnector::UpdateHTTP2DebugSymbols(std::string_view binary,
{ \
auto it = fn_args_map.find(arg); \
symaddr = (it != fn_args_map.end()) ? (it->second.offset + kSPOffset) : -1; \
LOG(INFO) << absl::Substitute(#symaddr " = $0", symaddr); \
VLOG(1) << absl::Substitute(#symaddr " = $0", symaddr); \
}
// Arguments of net/http.(*http2Framer).WriteDataPadded.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment