Commit Graph

5 Commits

Author SHA1 Message Date
Lorenzo Colitti
da0c43e38f Run bpf_existence_test in mainline-postsubmit.
The TEST_MAPPING file already contains a mainline-postsubmit
stanza, but according to go/test-mapping-mainline-user-guide
this information also needs to be in AndroidTest.xml (or in
Android.bp, for tests that are not covered by an AndroidTest.xml
and where soong autogenerates the test config).

Test: m bpf_existence_test
Change-Id: I103f5fefbfefa6fd2b59ab6c209fbf1dceada4ba
2022-01-18 00:13:51 +09:00
Lorenzo Colitti
32999378a7 Don't pass non-const refs.
Non-const refs are not allowed by style guide.
This was just an oversight.

Test: m bpf_existence_test
Change-Id: I8947118618dd5beef7f5643475d348f709799922
2022-01-14 09:41:11 +09:00
Lorenzo Colitti
8db39c4572 Test for the existence of maps as well as programs.
Test: passes on barbet running aosp/master
Change-Id: I41dcf8aa99a38a00227d608f421672c398cd2065
2022-01-13 16:12:35 +09:00
Lorenzo Colitti
32bd071ecb Minor simplifications in bpf_existence_test.
1. Use set instead of vector. This simplifies the code a bit.
2. Use proper NDK constants and functions to check the device
   OS version.

Test: test-only change
Test: passes on flame running qt-dev build (no-op)
Test: passes on flame running RQ3A build
Test: passes on raven running SP2A build
Test: passes on barbet running aosp/master
Change-Id: Ie13e1df674e50fcfb70811bc0dccae515cbb6e1c
2022-01-13 15:57:00 +09:00
Lorenzo Colitti
3b38b12071 Make MTS verify expected BPF programs based on OS version.
While this does not capture all nuances of optional programs,
go devices, etc. it should be a useful starting point to tell us
if something is really unexpected.

Test: test-only change
Test: passes on flame running qt-dev build (no-op)
Test: passes on flame running RQ3A build
Test: passes on raven running SP2A build
Test: passes on barbet running aosp/master
Change-Id: I43ff8c61c861c008cce459d2dcb487bb536c8da8
2022-01-13 15:31:27 +09:00