The GetProcessTmpDir_ChildProcess_ReadsTmpdir unit test (introduced in #5735) fails intermittently on the Ubuntu 22.04 x64 CI leg. The test spawns a child process with TMPDIR=/custom/tmp/test via ProcessStartInfo.Environment, then verifies that GetProcessTmpDir reads
the custom value from /proc/{pid}/environ.
Failure
Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "/custom/tmp/test" Actual: "/tmp/" ↑ (pos 1)
The environ file was successfully read (environReadable = true), but the parsed TMPDIR was /tmp/ (the Path.GetTempPath() fallback) instead of the custom value set via ProcessStartInfo.Environment.
Possible Causes
- Race condition: The child process's
/proc/{pid}/environ may not reflect the overridden environment if read before execve completes
- Empty environ: Some CI configurations may return readable but empty
/proc/{pid}/environ
- Environment propagation:
ProcessStartInfo.Environment override may not propagate in certain CI environments
The
GetProcessTmpDir_ChildProcess_ReadsTmpdirunit test (introduced in #5735) fails intermittently on the Ubuntu 22.04 x64 CI leg. The test spawns a child process withTMPDIR=/custom/tmp/testviaProcessStartInfo.Environment, then verifies thatGetProcessTmpDirreadsthe custom value from
/proc/{pid}/environ.Failure
Assert.Equal() Failure: Strings differ ↓ (pos 1) Expected: "/custom/tmp/test" Actual: "/tmp/" ↑ (pos 1)
The environ file was successfully read (
environReadable = true), but the parsed TMPDIR was/tmp/(thePath.GetTempPath()fallback) instead of the custom value set viaProcessStartInfo.Environment.Possible Causes
/proc/{pid}/environmay not reflect the overridden environment if read beforeexecvecompletes/proc/{pid}/environProcessStartInfo.Environmentoverride may not propagate in certain CI environments