summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2023-09-28 00:12:06 -0700
committerMaciej Żenczykowski <maze@google.com>2023-09-28 00:12:24 -0700
commit6a050d20259d56d96c52e63c0e1b057a9d702412 (patch)
treec92713de552f2f3b6c8e85b67a8fb8ffbd7fd5e7 /tests
parent865f4608992b2e231fea601e56b2aa3ebe65174e (diff)
downloadnetd-6a050d20259d56d96c52e63c0e1b057a9d702412.tar.gz
fix a compile error
Test: TreeHugger, m bpf_benchmark Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ib38c429be6d217ab0e13ed6c33923ecf5fc8f523
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/bpf_benchmark.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/benchmarks/bpf_benchmark.cpp b/tests/benchmarks/bpf_benchmark.cpp
index 4ceefca3..574d0dc8 100644
--- a/tests/benchmarks/bpf_benchmark.cpp
+++ b/tests/benchmarks/bpf_benchmark.cpp
@@ -29,7 +29,10 @@ using android::bpf::BpfMap;
class BpfBenchMark : public ::benchmark::Fixture {
public:
- BpfBenchMark() : mBpfTestMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC) {}
+ BpfBenchMark() {
+ mBpfTestMap.resetMap(BPF_MAP_TYPE_HASH, TEST_MAP_SIZE, BPF_F_NO_PREALLOC);
+ }
+
BpfMap<uint32_t, uint32_t> mBpfTestMap;
};