-
Notifications
You must be signed in to change notification settings - Fork 11
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
new(pkg,tests): port falco driver loader tests to use falcoctl. #34
Conversation
Signed-off-by: Federico Di Pierro <[email protected]>
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.
We don't need a falco-driver-loader tester at all now that driver-loader is a feature of falcoctl.
loaderRes := falcodriverloader.Test( | ||
tests.NewFalcoDriverLoaderExecutableRunner(t), | ||
falcodriverloader.WithArgs("bpf", "--compile"), | ||
// First, configure falcoctl driver |
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.
2 steps:
falcoctl driver config --type X
falcoctl driver install
// We expect the probe to be symlinked in '/root/.falco/falco-bpf.o' | ||
assert.Regexp(t, `Success: eBPF probe symlinked`, loaderRes.Stdout()) | ||
// We expect the probe to be succesfully built and copied to /root/.falco/falco-bpf.o | ||
assert.Regexp(t, `Probe successfully built.`, loaderRes.Stdout()) |
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.
New success message.
|
||
// Now running Falco with `FALCO_BPF_PROBE=/root/.falco/falco-bpf.o` we should be able to run the bpf driver | ||
falcoRes := falco.Test( | ||
tests.NewFalcoExecutableRunner(t), | ||
falco.WithStopAfter(3*time.Second), | ||
falco.WithEnvVars(map[string]string{"FALCO_BPF_PROBE": "/root/.falco/falco-bpf.o"}), | ||
falco.WithArgs("-o", "engine.kind=ebpf"), |
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.
Set new Falco engine
options to run with ebpf.
/hold until we are ready to merge falcosecurity/falco#2905 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Let's go in with this. I will bump the falcosecurity/testing submodule in my Falco PR falcosecurity/falco#2905 and test the changes. |
/unhold |
This will fail for Falco master; this PR should let falcosecurity/falco#2905 CI pass fine.