Skip to content

Catch fd leaks in all tests#142

Merged
haesbaert merged 3 commits intomainfrom
catchleaks
Apr 2, 2025
Merged

Catch fd leaks in all tests#142
haesbaert merged 3 commits intomainfrom
catchleaks

Conversation

@haesbaert
Copy link
Collaborator

This adds a fd leak detector for the test framework. We count the number of opened file descriptors before and after each test, if the number differs, we dump all file descriptors as an error.

Output example:

t_probe @ ebpf................failed
FDLEAK DETECTED! 4 opened descriptors, expected 3
0 -> /dev/pts/1
1 -> /dev/pts/1
2 -> pipe:[667586]
3 -> /dev/pts/1

Issue #141

This adds a fd leak detector for the test framework.
We count the number of opened file descriptors before and after each test, if
the number differs, we dump all file descriptors as an error.

Output example:
```
t_probe @ ebpf................failed
FDLEAK DETECTED! 4 opened descriptors, expected 3
0 -> /dev/pts/1
1 -> /dev/pts/1
2 -> pipe:[667586]
3 -> /dev/pts/1
```

Issue #141
@haesbaert haesbaert requested a review from a team as a code owner April 1, 2025 22:23
haesbaert and others added 2 commits April 2, 2025 07:54
Co-authored-by: Nicholas Berlin <56366649+nicholasberlin@users.noreply.github.com>
Co-authored-by: Nicholas Berlin <56366649+nicholasberlin@users.noreply.github.com>
@haesbaert haesbaert merged commit 46d9219 into main Apr 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants