Skip to content

Commit 4fd7d4e

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 2958525 commit 4fd7d4e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/process/io_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ func descriptorCount(t *testing.T) int {
8989
continue
9090
}
9191

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

0 commit comments

Comments
 (0)