Skip to content

Commit

Permalink
don't set limits for the bpfadapter in test mode
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Pavel Dubovitsky authored and facebook-github-bot committed Aug 17, 2023
1 parent 7025631 commit e2c463b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion katran/lib/testing/BpfTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit e2c463b

Please sign in to comment.