carlos / platform Public

host: the fd probe names the descriptor it did not expect

TestRegistryChildPinnedExecutableAndMinimalFDs fails on CI with exit
status 22 and no output, so nobody can tell what leaked. The child now
prints the fd and its target before it exits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a97ee449b1bb82fbec893438f5597f004ae52e5c parent 5ab06c0
1 file changed, +2 −0
  • internal/host/registrychild_exec_linux_test.go +2 −0

CI cancelled — superseded by a newer push — run details

diff --git a/internal/host/registrychild_exec_linux_test.go b/internal/host/registrychild_exec_linux_test.go
index 0cafb04be..e05eb389d 100644
--- a/internal/host/registrychild_exec_linux_test.go
+++ b/internal/host/registrychild_exec_linux_test.go
@@ -138,6 +138,8 @@ func TestRegistryChildFDHelper(t *testing.T) {
os.Exit(21)
}
if target != "anon_inode:[eventpoll]" && target != "anon_inode:[eventfd]" {
+ // Name the descriptor, so a failure says what leaked.
+ fmt.Fprintf(os.Stderr, "unexpected fd %d -> %s\n", fd, target)
os.Exit(22)
}
}