From e2c463b8e4d7b5667e52dcf30aa420628433e597 Mon Sep 17 00:00:00 2001 From: Pavel Dubovitsky Date: Thu, 17 Aug 2023 09:35:59 -0700 Subject: [PATCH] don't set limits for the bpfadapter in test mode Summary: by default the BpfAdapter would try to set locked memory rlimit value to unlimited. It is not necessary for the local test, and it can break the unit tests to, due to insufficient privileges. emoving this requirement for the local test. If required, the limits should be adjusted before the test execution. Reviewed By: lalitg845 Differential Revision: D48422026 fbshipit-source-id: f34ec1749e3178d39eb75c6f98f30fa3ab61c7f3 --- katran/lib/testing/BpfTester.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/katran/lib/testing/BpfTester.cpp b/katran/lib/testing/BpfTester.cpp index c3e4aa59d..1c736b447 100644 --- a/katran/lib/testing/BpfTester.cpp +++ b/katran/lib/testing/BpfTester.cpp @@ -50,7 +50,9 @@ constexpr uint32_t kNanosecInSec = 1000000000; } // namespace BpfTester::BpfTester(const TesterConfig& config) - : config_(config), parser_(config.inputFileName, config.outputFileName) {} + : config_(config), + parser_(config.inputFileName, config.outputFileName), + adapter_(false /* set_limits */) {} void BpfTester::printPcktBase64() { if (config_.inputFileName.empty()) {