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

chore(selftest): Add tc Query test case #422

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

chentao-kernel
Copy link
Contributor

@chentao-kernel chentao-kernel commented Apr 8, 2024

The bpf_tc_query interface should init the parameter first, sometimes it may be confused for us, so add the test case to reduce the confusion.

Close: #421

@geyslan
Copy link
Member

geyslan commented Apr 8, 2024

@chentao-kernel do you mind tackling in this same PR this other issue? #420

@chentao-kernel chentao-kernel force-pushed the dylane/tc branch 3 times, most recently from be0a5e6 to 91924f3 Compare April 8, 2024 16:03
@chentao-kernel
Copy link
Contributor Author

@chentao-kernel do you mind tackling in this same PR this other issue? #420

@geyslan hi, geyslan, i add the test case for #420, it seems the same cause with 421

@chentao-kernel chentao-kernel force-pushed the dylane/tc branch 3 times, most recently from 1d3c72c to 968c093 Compare April 8, 2024 16:22
@geyslan
Copy link
Member

geyslan commented Apr 9, 2024

@geyslan hi, geyslan, i add the test case for #420, it seems the same cause with 421

Tks. Before I return to this, would you mind checking my review above?

@chentao-kernel
Copy link
Contributor Author

chentao-kernel commented Apr 9, 2024

@geyslan hi, geyslan, i add the test case for #420, it seems the same cause with 421嗨,Geyslan,我添加了测试 #420 用例,这似乎与 421 的原因相同

Tks. Before I return to this, would you mind checking my review above?啧。在我回到这个之前,你介意看看我上面的评论吗?

you mean issue #420 and #421 ? actually,the test case mentioned in #420 #421 not correct, we should init the parameter first, you can see test case in linux source tools/testing/selftest/bpf/prog_tests/tc_bpf.c

selftest/tc/main.go Outdated Show resolved Hide resolved
selftest/tc/main.go Outdated Show resolved Hide resolved
selftest/tc/main.go Outdated Show resolved Hide resolved
The bpf_tc_query/bpf_tc_detach interface should init the parameter
first, sometimes it may be confused for us, so add the case to reduce
the confusion.

aquasecurity#421
aquasecurity#420

Signed-off-by: Tao Chen <[email protected]>
@geyslan geyslan self-assigned this Apr 9, 2024
@geyslan geyslan merged commit 282d443 into aquasecurity:main Apr 9, 2024
17 checks passed
@geyslan
Copy link
Member

geyslan commented Apr 9, 2024

Tks @chentao-kernel.

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.

TcHook.Query() always raises the failed to query tc hook: invalid argument error.
2 participants