-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add an e2e test to verify the --comm
option works fine
#212
Comments
You haven't started this work yet, have you? |
No, I haven't.
ok. @spencercjh Thank you very much, assigned this issue to you. |
I looked at the source code and the filtering of processes is done in It looks like
I've tested all of the above locally. Also, the current implementation of |
Actually, Kyanos knows when a process starts via eBPF tracepoint(sched_process_exec). After a process starts, it checks if the comm parameter matches the process name. If they match, it updates the filterPidMap in the kernel, bpf progs use filterPidMap to filter event by pid. Look source code at: setAndValidateParameters(line: 292 ~ 309) |
Looks like something went wrong with my local test. I'll carry on. |
Nice. |
The HTTPS protocol cannot be used when testing with curl. When using HTTP, we can see HTTP responses with 301. |
The first case "target process start, then kyanos start, expected kyanos can watch the target process's network." , you may not be able to use curl as the 'curl' process will terminate very quickly. Therefore, a server process might be needed for testing. @spencercjh |
Thanks for the explanation. 😭 🙏 |
Is your feature request related to a problem? Please describe.
Add an e2e test to verify the
--comm
(filter by process name) option works fineDescribe the solution you'd like
Add a bash script file in
testdata/
which contains the main test logic. (like this one:test_docker_filter_by_pid.sh
), including two cases:Add a step in workflow : .github/workflows/test.yml which executes the test script file in 1.
The text was updated successfully, but these errors were encountered: