-
Notifications
You must be signed in to change notification settings - Fork 13
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: add bpf test with DNS gadget from local-gadget #260
Conversation
this method is quite handy to generate Docker image based on host binaries. It helps to circumvent Docker rate limit and it also remove third-party dependencies. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
0c1feba
to
b745f9c
Compare
kola/tests/bpf/local-gadget.go
Outdated
c.Fatalf("unable to run docker cmd: %v", err) | ||
} | ||
|
||
out, err := c.SSH(node, "cat /tmp/local-gadget.res | grep pkt_type | head --lines 1 | jq -r .name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out, err := c.SSH(node, "cat /tmp/local-gadget.res | grep pkt_type | head --lines 1 | jq -r .name") | |
out, err := c.SSH(node, "grep -m 1 pkt_type /tmp/local-gadget.res | jq -r .name") |
This makes the processes run without error, not a real problem but if it gets copied later where pipefail is set, grep will fail when head terminates earlier because it does not consume the full input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip.
Run: localGadgetTest, | ||
Name: `bpf.local-gadget`, | ||
Distros: []string{"cl"}, | ||
// required while SELinux policy is not correcly updated to support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's see if it works on the current LTS, otherwise we can add a minimum version later
@pothos thanks for this quick review 😂 but it's still WIP, currently adding seccomp-gadget test. |
b745f9c
to
57ea565
Compare
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
57ea565
to
589cc4a
Compare
In this PR, we test
IG
and related BPF features on Flatcar withlocal-gadget
starting with DNS gadget.We basically install
local-gadget
and prepare its run using CLC.It currently runs without SELinux due to this: flatcar/Flatcar#509
How to use
Testing done
Related-to: flatcar/Flatcar#89
It could be merged with: #233 to kickoff BPF tests on Flatcar.