-
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
cleanup(tests): remove wrong/unused assert. #66
Conversation
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
/hold |
708f66e
to
8605ecc
Compare
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
8605ecc
to
a4af8b6
Compare
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP 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 |
/unhold |
/lgtm |
falcosecurity/libs#2165 exposed a bug in the
TestFalco_Legacy_FalcoEventGenerator
test.Previous code was storing full user/group info in threadinfo; before parsers understood that container_id was changed (ie: we entered a container),
set_{user,group}
was called (eg here: https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/parsers.cpp#L1769), storing in the threadinfo user and group information related to uid and gid for the host. Then, when refreshing info for the container(https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/parsers.cpp#L1843), since the container data cannot be loaded while replaying a scap file, and since the scap file itself does not containeruseradded
events (being too old), we did not overwrite existing user/group info stored in the threadinfo.Therefore the threadinfo was returning user and group releted info mapped to the host while being on a container.
The new code fixed that behavior but then the test fails. Since we have no way to retrieve the correctly mapped-to-the-container user and group info while replaying a scap file that has no
useradded
events, we can only remove the assert.