Skip to content

Commit

Permalink
Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zhsj committed Aug 14, 2024
1 parent 716c7b7 commit 09ca004
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/process/io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ func descriptorCount(t *testing.T) int {
continue
}

if strings.HasPrefix(sym, "pidfd:") {
if strings.Contains(sym, "pidfd") {
// Either pidfd:[70517] or anon_inode:[pidfd] (on Linux 5.4)
files = append(files[:i], files[i+1:]...)
}
}
Expand Down

0 comments on commit 09ca004

Please sign in to comment.