-
Notifications
You must be signed in to change notification settings - Fork 382
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
pkg/sensors: fix binprm matchArgs test #2624
Conversation
The test was broken in two ways: - First it was using the "In" operator with MatchArgs, which does not exist. "Equal" should be used. It can be confusing because MatchBinaries uses "In". It bypasses validation since it provided the Go object without using the YAML unmarshalling. - Secondly, it was only checking that the event existed without checking that the filtering actually happened. We can check the "lack" of event in addition to the presence of it thanks to the way this test is written, using the perfring.RunTestEvents. This test should have detected the issue fixed by the following patch. Signed-off-by: Mahe Tardy <[email protected]>
Signed-off-by: Andrei Fedotov <[email protected]>
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Seems to fail in 4.19:
Maybe we need to skip the test if Line 217 in e44f7df
|
I skipped it already in my #2623. We can merge any of these PRs I think)). |
I guess we don't need this one now. |
Based on #2623 work. Given this comment #2623 (comment).
cc @anfedotoff @dwindsor.
Running the test with the first commit only should fail as expected:
go test -exec sudo ./pkg/sensors/tracing --run TestLinuxBinprmExtractPath
With @anfedotoff patch, the test should now be green.