-
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
kola/test: add bpf
tests
#233
Conversation
3cba0b4
to
260cfa2
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.
One question, otherwise looks alright.
|
||
// wait for the container and the `execsnoop` command to be correctly started before | ||
// generating traffic. | ||
if err := util.Retry(5, 2*time.Second, func() error { |
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.
Every loop of the retry runs docker ps
so now its definitely possible to have more than 3 lines in the log (if the retry happens)?
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.
Mm, I get your point but it should not:
in the iteration, we run docker ps
then we check sudo cat $(docker inspect --format='{{.LogPath}}' %s)
:
- empty: it means
execsnoop
is not correctly started (or does not filter correctly) -> we continue to iterate - not empty:
execsnoop
is correctly started because it generated some logs based on thedocker ps
"trigger" -> we continue the program
Even in the case we loop 5 times, it means that in the meantime not logs have been generated -> execsnoop
was not ready. In the end, we should always get 3 lines into the logs.
f2f9f8e
to
61d27cd
Compare
@krnowak thanks for the review - comments have been addressed :) |
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.
Cool, looks good.
in this commit, we add a test for `execsnoop` Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
da99cb9
to
58be237
Compare
} | ||
|
||
func init() { | ||
register.Register(®ister.Test{ |
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.
On arm this fails with:
cluster.go:117: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Could you disable this test for arm for the time being?
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.
Mm, Docker image has not yet arm64
support - let's open a tracking issue upstream and exclude ARM64 for this test then.
Thanks for the report !
In this PR, we kick-off the writing of
bpf
tests.To use it:
Related to: flatcar/Flatcar#89