BpfMap.getOrCreate(size, path, type) -> BpfMap.init(path)
We don't have the appropriate selinux privs to create the maps anyway.
Test: builds (when combined with system/netd change)
'git grep getOrCreate' in system/{bpf,netd} comes up empty
atest netd_unit_test netd_integration_test libbpf_android_test
Bug: 65674744
Bug: 129654883
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idffbce5b28b723943c6495cfafdecddc7a0f4e67
This commit is contained in:
parent
04d88b7576
commit
52108bf52c
1 changed files with 8 additions and 28 deletions
|
|
@ -174,7 +174,7 @@ TEST_F(BpfMapTest, SetUpMap) {
|
|||
EXPECT_EQ(0, access(PINNED_MAP_PATH, R_OK));
|
||||
checkMapValid(testMap1);
|
||||
BpfMap<uint32_t, uint32_t> testMap2;
|
||||
EXPECT_OK(testMap2.getOrCreate(TEST_MAP_SIZE, PINNED_MAP_PATH, BPF_MAP_TYPE_HASH));
|
||||
EXPECT_OK(testMap2.init(PINNED_MAP_PATH));
|
||||
checkMapValid(testMap2);
|
||||
uint32_t key = TEST_KEY1;
|
||||
uint32_t value = TEST_VALUE1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue