commit | 4b1b4090de2a1de2c474359e2a011a51bbde385a | [log] [tgz] |
---|---|---|
author | Maciej Żenczykowski <maze@google.com> | Mon Jun 13 18:33:27 2022 -0700 |
committer | Maciej Żenczykowski <maze@google.com> | Mon Jun 13 19:37:03 2022 -0700 |
tree | 36db2ddc2081d236368082e17929561ac5bd4bf4 | |
parent | e8dceddeec89515ee0ea53e6ad3d92bb5d63d623 [diff] |
TEST_BPF_MAP -> BPF_MAP_MAKE_VISIBLE_FOR_TESTING Per request of Lorenzo on: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/libs/net/+/18694820 https://googleplex-android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/18695355 Although he'd suggested 'BPF_MAP_TEST_ONLY', but I think this is even clearer. Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ie1185a61e80abe94e19903f6aa66bb1ad29ce2f4
diff --git a/staticlibs/native/bpf_headers/include/bpf/BpfMap.h b/staticlibs/native/bpf_headers/include/bpf/BpfMap.h index a7720ea..0054753 100644 --- a/staticlibs/native/bpf_headers/include/bpf/BpfMap.h +++ b/staticlibs/native/bpf_headers/include/bpf/BpfMap.h
@@ -106,7 +106,7 @@ // Function that tries to get map from a pinned path. [[clang::reinitializes]] base::Result<void> init(const char* path); -#ifdef TEST_BPF_MAP +#ifdef BPF_MAP_MAKE_VISIBLE_FOR_TESTING // due to Android SELinux limitations which prevent map creation by anyone besides the bpfloader // this should only ever be used by test code, it is equivalent to: // .reset(createMap(type, keysize, valuesize, max_entries, map_flags)