BpfMapTest: fixes for testGetFd
Test: TreeHugger, atest BpfMapTest happier Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ib2915d48fab2c1e90300f1d4aa5d2cb2f69741f9
This commit is contained in:
parent
45e9372733
commit
878aae0856
3 changed files with 6 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue