diff --git a/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs b/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs index 34de140..d70ba60 100644 --- a/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs +++ b/tests/ClawdDotNet.Core.Tests/Sandbox/SandboxEscapeTests.cs @@ -126,7 +126,9 @@ public sealed class SandboxEscapeTests : IDisposable { using var held = File.OpenRead(_instanceSecret); // a file the main process has open - var result = await Sh("for f in /proc/$$/fd/*; do echo ${f##*/}; done"); + // Listed by a child: a shell globbing its own /proc/$$/fd opens that directory and + // would count the handle as fd 3. + var result = await Sh("ls /proc/$$/fd"); result.StandardOutput.Split('\n', StringSplitOptions.RemoveEmptyEntries).ShouldBe(["0", "1", "2"], ignoreOrder: true); }