Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test:Fix the test_libbcc/test_libbcc_no_libbpf testcase failure when the kernel version is lower than 4.20 #3257

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

w00560594
Copy link
Contributor

@w00560594 w00560594 commented Feb 2, 2021

The BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE type is only supported in the version of the kernel >=4.20, causing the bpf_init function failed on the low kernel version.

test/cc/test_cg_storage.cc
TEST_CASE("test percpu cgroup storage", "[percpu_cgroup_storage]") { { const std::string BPF_PROGRAM = R"( BPF_PERCPU_CGROUP_STORAGE(cg_storage1, long long); BPF_PERCPU_CGROUP_STORAGE(cg_storage2, long long); int test(struct bpf_sock_ops *skops)

after modify, the test case can be executed successfully :
3/43 Test #3: test_libbcc ...................... Passed 18.58 sec
Start 4: test_libbcc_no_libbpf
4/43 Test #4: test_libbcc_no_libbpf ............ Passed 18.46 sec
Start 5: py_test_stat1_b

@w00560594 w00560594 changed the title Fix the test_libbcc/test_libbcc_no_libbpf testcase failure when the kernel version is lower than 4.20 test:Fix the test_libbcc/test_libbcc_no_libbpf testcase failure when the kernel version is lower than 4.20 Feb 2, 2021
@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

Thanks!

@yonghong-song yonghong-song merged commit 777b9be into iovisor:master Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants