Commit d1c2c9d
committed
tetragon: Limit sys_close events in test
The TestKprobeMatchArgsFileEqual test (among others) uses the
getMatchArgsFdCrd() function to generate a policy to track file
descriptors and subsequent specific file actions happening to certain
files. While the fd_install kprobe matches the file specifications
provided, the sys_close kprobe (that unfollows the FD) does not. This
results in vast amounts of sys_close events.
When using the perf ring buffer, this did not cause test failures. With
the BPF ring buffer, the tests can flake, however. This is due to the
additional volume of events processed in user space (due to the
increased efficiency of the BPF ring buffer), delaying the test events'
arrival, and causing the test to give up before the test events have
been observed.
This commit adds the file specification to the sys_close selectors to
reduce the number of additional events.
Signed-off-by: Kevin Sheldrake <[email protected]>1 parent 7f09bfd commit d1c2c9d
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3336 | 3336 | | |
3337 | 3337 | | |
3338 | 3338 | | |
3339 | | - | |
| 3339 | + | |
3340 | 3340 | | |
3341 | | - | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
3342 | 3350 | | |
3343 | 3351 | | |
3344 | 3352 | | |
| |||
0 commit comments