Skip to content

Commit 09ca004

Browse files
committed
Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
When running the test on Ubuntu focal (kernel version 5.4), the symlink for pidfd is anon_inode:[pidfd]. Updates: #10345 Signed-off-by: Shengjing Zhu <[email protected]> (cherry picked from commit 8ef73c5) Signed-off-by: Shengjing Zhu <[email protected]>
1 parent 716c7b7 commit 09ca004

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/process/io_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ func descriptorCount(t *testing.T) int {
8888
continue
8989
}
9090

91-
if strings.HasPrefix(sym, "pidfd:") {
91+
if strings.Contains(sym, "pidfd") {
92+
// Either pidfd:[70517] or anon_inode:[pidfd] (on Linux 5.4)
9293
files = append(files[:i], files[i+1:]...)
9394
}
9495
}

0 commit comments

Comments
 (0)