Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,27 @@ using ::testing::UnorderedElementsAre;

class ThriftMuxServerContainerWrapper : public ::px::stirling::testing::ThriftMuxServerContainer {};

// The Init() function is used to set flags for the entire test.
// We can't do this in the MuxTraceTest constructor, because it will be too late
// (SocketTraceBPFTestFixture will already have been constructed).
bool Init() {
// Make sure Mux tracing is enabled.
FLAGS_stirling_enable_mux_tracing = true;

// We turn off CQL and NATS tracing to give some BPF instructions back for Mux.
// This is required for older kernels with only 4096 BPF instructions.
FLAGS_stirling_enable_cass_tracing = false;
FLAGS_stirling_enable_nats_tracing = false;

// Enable the raw fptr fallback for determining ssl lib version.
FLAGS_openssl_raw_fptrs_enabled = true;
return true;
namespace {
constexpr bool kClientSideTracing = false;
}

bool kInit = Init();

template <typename TServerContainer>
class BaseOpenSSLTraceTest : public SocketTraceBPFTestFixture</* TClientSideTracing */ false> {
class BaseOpenSSLTraceTest : public SocketTraceBPFTestFixture<kClientSideTracing> {
protected:
void SetUp() override {
PX_SET_FOR_SCOPE(FLAGS_stirling_enable_mux_tracing, true);

// We turn off CQL and NATS tracing to give some BPF instructions back for Mux.
// This is required for older kernels with only 4096 BPF instructions.
PX_SET_FOR_SCOPE(FLAGS_stirling_enable_cass_tracing, false);
PX_SET_FOR_SCOPE(FLAGS_stirling_enable_nats_tracing, false);

// Enable the raw fptr fallback for determining ssl lib version.
PX_SET_FOR_SCOPE(FLAGS_openssl_raw_fptrs_enabled, true);

SocketTraceBPFTestFixture<kClientSideTracing>::SetUp();
}

BaseOpenSSLTraceTest() {
// Run the nginx HTTPS server.
// The container runner will make sure it is in the ready state before unblocking.
Expand Down