new(pkg,tests): port falco driver loader tests to use falcoctl.#34
Conversation
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
There was a problem hiding this comment.
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.
2 steps:
falcoctl driver config --type Xfalcoctl 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.
New success message.
| 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.
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 DetailsNeeds 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.