BpfMapTest: fixes for testGetFd am: 878aae0856

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3134197

Change-Id: I37b4c2d394f9ad7685f66ad25fdf7513b018e69d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Maciej Żenczykowski 2024-06-15 23:29:52 +00:00 • committed by Automerger Merge Worker
commit f57637edea
3 changed files with 6 additions and 1 deletions

View file

@ -71,6 +71,8 @@ public final class BpfMapTest {
"/sys/fs/bpf/tethering/map_test_tether_downstream6_map";
private static final String TETHER2_DOWNSTREAM6_FS_PATH =
"/sys/fs/bpf/tethering/map_test_tether2_downstream6_map";
private static final String TETHER3_DOWNSTREAM6_FS_PATH =
"/sys/fs/bpf/tethering/map_test_tether3_downstream6_map";
private ArrayMap<TetherDownstream6Key, Tether6Value> mTestData;
@ -156,7 +158,7 @@ public final class BpfMapTest {
assertEquals(OsConstants.EPERM, expected.errno);
}
}
try (BpfMap writeOnlyMap = new BpfMap<>(TETHER_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_WRONLY,
try (BpfMap writeOnlyMap = new BpfMap<>(TETHER3_DOWNSTREAM6_FS_PATH, BpfMap.BPF_F_WRONLY,
TetherDownstream6Key.class, Tether6Value.class)) {
assertNotNull(writeOnlyMap);
try {

View file

@ -47,6 +47,8 @@ DEFINE_BPF_MAP_GRW(tether_downstream6_map, HASH, TetherDownstream6Key, Tether6Va
TETHERING_GID)
DEFINE_BPF_MAP_GRW(tether2_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
TETHERING_GID)
DEFINE_BPF_MAP_GRW(tether3_downstream6_map, HASH, TetherDownstream6Key, Tether6Value, 16,
TETHERING_GID)
// Used only by BpfBitmapTest, not by production code.
DEFINE_BPF_MAP_GRW(bitmap, ARRAY, int, uint64_t, 2, TETHERING_GID)

View file

@ -69,6 +69,7 @@ static const set<string> MAINLINE_FOR_S_PLUS = {
TETHERING "map_test_bitmap",
TETHERING "map_test_tether_downstream6_map",
TETHERING "map_test_tether2_downstream6_map",
TETHERING "map_test_tether3_downstream6_map",
TETHERING "prog_offload_schedcls_tether_downstream4_ether",
TETHERING "prog_offload_schedcls_tether_downstream4_rawip",
TETHERING "prog_offload_schedcls_tether_downstream6_ether",