Test loading both with & without BTF

Add path to a test program with BTF info included to test bpfloader
handles both situations correctly

Test: libbpf_load_test
Bug: 203823368
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ibe63cdc2ee59199b687d4006efadb201d4a17f3c
This commit is contained in:
Connor O'Brien 2022-01-21 18:21:23 -08:00
commit 0056fdce27
2 changed files with 3 additions and 1 deletions

View file

@ -104,6 +104,7 @@ cc_test {
required: [
"bpf_load_tp_prog.o",
"bpf_load_tp_prog_btf.o",
],
require_root: true,
}

View file

@ -99,7 +99,8 @@ class BpfLoadTest : public TestWithParam<std::string> {
};
INSTANTIATE_TEST_SUITE_P(BpfLoadTests, BpfLoadTest,
::testing::Values("/system/etc/bpf/bpf_load_tp_prog.o"));
::testing::Values("/system/etc/bpf/bpf_load_tp_prog.o",
"/system/etc/bpf/bpf_load_tp_prog_btf.o"));
TEST_P(BpfLoadTest, bpfCheckMap) {
checkMapNonZero();