Commit graph android_system_bpf/libbpf_android/BpfLoadTest.cpp
Message SHA1
Make BpfLoadTest parameterized to support multiple test programs
This will enable testing both with & without BTF enabled once
necessary build changes are merged.

Test: libbpf_load_test passes
Bug: 203823368
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ifd89b6c0701791c216807e913d9a4803d9a4dd20

Connor O'Brien   commited 2022-01-21 18:24:21 -08:00
00fa9635f8
[NETD-BPF#14] Move BPF map definition and utils to frameworks/libs/net/
Move BPF map definition and utilities to a common place that easy to be
referenced from both mainline module and platform code.

Bug: 202086915
Test: m; flash; boot
Test: cd system/netd/ && atest
Test: cd packages/modules/Connectivity && atest
Test: m gpuservice_unittest libtimeinstate_test bpf_module_test
      CtsAppOpsTestCases libbpf_load_test VtsBootconfigTest
      vts_test_binary_bpf_module bpf_benchmark libbpf_load_test
      libbpf_android_test
Change-Id: Ib15cf78c2da97bff835fb406c866676eec77c013

Ken Chen   authored and   Maciej Żenczykowski   commited 2021-12-04 03:42:55 +00:00
b1d4888ec2
SKIP_IF_BPF_NOT_SUPPORTED is a no-op
Android S requires devices to support eBPF.

Test: builds, atest, TreeHugger
Bug: 167500195
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I62fb97f79103515f5a2fd531cfa36356d21a4a6f

Maciej Żenczykowski   commited 2021-01-12 02:08:55 +00:00
5756f0c937
Warn loudly and do not set bpf.progs_loaded property on critical bpf load failure.
Reasoning: critical load failures for netd bpf programs will just result
in unpredictable behaviour later on.  For example netd/systemserver
crash loops.

Test: builds
Bug: 150040815
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iefa01e60cd0a9a223e96411726a199bfb4857a5a

Maciej Żenczykowski   commited 2020-06-15 08:01:50 +00:00
89515d979a
More missing calls to Result::ok() in libbpf_android tests
Test: m checkbuild
Change-Id: Idb70b975e3c3bcbaa78cb493ec8f66b9b625ef74

Bernie Innocenti   commited 2020-02-10 07:28:13 +09:00
43d2538871
BpfLoadTest.cpp - construct BpfMap from path not fd
switch over to the newer pinned path using constructor

Test: build, atest
  mMapFd no longer shows up in this file
Bug: 129773125
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie70149ffd5a541c80b35804ffd38df07f28b509b

Maciej Żenczykowski   commited 2020-01-30 08:59:44 +00:00
cd5c3023ce
libbpf_android: remove libnetdutils dep
Remove libnetdutils dependency because bpf is being used for things other
than networking these days, and we don't want to make libnetdutils
vendor-available in the future. libbase provides an alternative type now.

Bug: 140330870
Test: atest libbpf_android_test netd_integration_test netd_unit_test
    libnetdbpf_test bpf_module_test
Change-Id: I72ae8cd7f58a49bfc7dcb914a332a4c4bad5dea5

Steven Moreland   commited 2020-01-21 10:47:33 -08:00
e7cd2a72d0
libbpf_load_test: fix map location
This test had bitrot.

Bug: N/A
Test: `atest libbpf_load_test`
Change-Id: I3480286e225d8dfbd0badd7bbb7cb77ff29ab0ea

Steven Moreland   commited 2020-01-14 11:37:49 -08:00
cdeb9203af
Add tests for BPF loader
Bug: 112334572
Change-Id: I4457ee9ea3044c5c9ecb6ebfd5ad4f5a2c11dce5
Signed-off-by: Joel Fernandes <joelaf@google.com>

Joel Fernandes   commited 2019-02-04 15:28:52 -05:00
4845288a6e