The purpose of this test is to verify that the bpfloader related
stuff in the platform is compatible with mainline module bpf .o's.
To be more precise: the test is trying to check that platform/OEM
BPF programs (and, by implication, the platform/OEM bpfloader) have
a struct layout that is known, and thus that BPF programs shipped
in mainline modules will be compatible (with the OEM bpfloader).
(ie. basically this is trying to make sure that the vendor/oem
haven't made incompatible changes to the bpfloader parsed structs,
these can only be extended safely in aosp master)
Since clatd/netd.o have been moved to mainline they are no longer
a useful representation of the state of the platform side of things.
(we'd simply be testing that mainline is compatible with mainline,
which of course it is...)
As such we pick two other bpf .o files that are still shipped
as part of the platform.
Verified on cuttlefish via 'atest CtsNativeNetTestCases':
x86 CtsNativeNetTestCases
-------------------------
CtsNativeNetTestCases (2 Test(s))
[1/2] BpfTest#bpfStructSizeTestPreT: IGNORED (0ms)
[2/2] BpfTest#bpfStructSizeTest: PASSED (0ms)
Summary (Test executed with 1 device(s).)
-------
x86 CtsNativeNetTestCases: Passed: 1, Failed: 0, Ignored: 1, Assumption Failed: 0,
All tests passed!
Note: it's not clear to me if this code can even ever be run on pre-T devices...
but I guess it shouldn't hurt.
Bug: 215718693
Test: atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1b2d76e5ef95d8e4b94068f5525263653879d1f4
qtaguid is long dead - test is thus a no-op
New test logs:
Running Tests...
x86 CtsNativeNetTestCases
-------------------------
CtsNativeNetTestCases (1 Test)
[1/1] BpfTest#bpfStructSizeTest: PASSED (0ms)
Summary
-------
x86 CtsNativeNetTestCases: Passed: 1, Failed: 0, Ignored: 0, Assumption Failed: 0,
All tests passed!
Test: atest CtsNativeNetTestCases, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9ff784dbfda0ce981904d53eacb7bc831cbe81da
This test is required to ensure that the system is compatible
with future updates of the tethering mainline module, which
updates BPF .o files on device.
This test must already be passing on OEM devices because otherwise
the offload.o program in the Tethering mainline module would bootloop
the device.
Bug: 190519702
Test: atest CtsNativeNetTestCases, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibaedb8fcb28591ffba1506514f2305d55712a26b
Here comes a new relocations scheme that isn't compatible with Q
devices after aosp/1673945.
In order to avoid our tests are built with the new scheme, set SDK
version to 29.
Bug: 187905499
Test: forrest, atest
Change-Id: I31f13e2b95bacdca4c1897742cada2da169a89fd