Skip to content

Commit 8ef73c5

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]>
1 parent 58cf6e2 commit 8ef73c5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/containerd-shim-runc-v2/process/io_test.go

Lines changed: 2 additions & 1 deletion
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)