Merge "adjust BpfCompatTest now that clatd & netd bpf program have been mainlined" am: e0904b5a12
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1957213 Change-Id: I0d2e35da256e57dc79ee2b3d08cf62f89e9c9cf0
This commit is contained in:
commit
06f4e26cb6
2 changed files with 10 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ cc_test {
|
|||
static_libs: [
|
||||
"libbpf_android",
|
||||
"libgtest",
|
||||
"libmodules-utils-build",
|
||||
],
|
||||
|
||||
// Tag this module as a cts test artifact
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "android-modules-utils/sdk_level.h"
|
||||
|
||||
#include "libbpf_android.h"
|
||||
|
||||
using namespace android::bpf;
|
||||
|
|
@ -33,11 +35,17 @@ void doBpfStructSizeTest(const char *elfPath) {
|
|||
EXPECT_EQ(28, readSectionUint("size_of_bpf_prog_def", elfFile, 0));
|
||||
}
|
||||
|
||||
TEST(BpfTest, bpfStructSizeTest) {
|
||||
TEST(BpfTest, bpfStructSizeTestPreT) {
|
||||
if (android::modules::sdklevel::IsAtLeastT()) GTEST_SKIP() << "T+ device.";
|
||||
doBpfStructSizeTest("/system/etc/bpf/netd.o");
|
||||
doBpfStructSizeTest("/system/etc/bpf/clatd.o");
|
||||
}
|
||||
|
||||
TEST(BpfTest, bpfStructSizeTest) {
|
||||
doBpfStructSizeTest("/system/etc/bpf/gpu_mem.o");
|
||||
doBpfStructSizeTest("/system/etc/bpf/time_in_state.o");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
|
|
|
|||
Loading…
Reference in a new issue