diff options
author | Jakob Unterwurzacher | 2024-12-04 19:51:33 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2024-12-04 19:51:33 +0100 |
commit | 9529f5da0f608c7dbc7b7be095d89039d6a3a5b6 (patch) | |
tree | eb230284bf63be1a12f91a02fc3633dbf0656b6a | |
parent | 82dac42e85f01b1ea3383470350aa837a19f0ac3 (diff) |
tests: ignore pidfd in fd leak test
This is not a real leak:
fd leak in test process? before, after:
[0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll])]
[0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] 12rw=anon_inode:[pidfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll], pipe:[2460158])]
Ignore pidfd.
-rw-r--r-- | tests/test_helpers/mount_unmount.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go index afd33f1..46c64c9 100644 --- a/tests/test_helpers/mount_unmount.go +++ b/tests/test_helpers/mount_unmount.go @@ -242,11 +242,12 @@ func ListFds(pid int, prefix string) []string { // fd was closed in the meantime continue } - if strings.HasPrefix(target, "pipe:") || strings.HasPrefix(target, "anon_inode:[eventpoll]") { + if strings.HasPrefix(target, "pipe:") || strings.HasPrefix(target, "anon_inode:[eventpoll]") || + strings.HasPrefix(target, "anon_inode:[pidfd]") { // The Go runtime creates pipes on demand for splice(), which // creates spurious test failures. Ignore all pipes. - // Also get rid of the "eventpoll" fd that is always there and not - // interesting. + // Also get rid of the "eventpoll" and "pidfd" fds that are always there + // and not interesting. filtered = append(filtered, target) continue } |