You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Each coverage run leaves ~50 six-byte /tmp/CodeCoverage.* files behind on Linux (18.11.x) #252
TL;DR: On Linux, each dotnet test --coverage run leaves about 50 six-byte /tmp/CodeCoverage.* files behind in my runs. Versions 18.11.0 and 18.11.2 do this; 18.10.0 left none under the same test configurations. The files are never removed, so they accumulate when tests run repeatedly.
Package:Microsoft.Testing.Extensions.CodeCoverage 18.11.0 and 18.11.2 (the latest at the time of writing) Runtime: .NET 8 and .NET 10 hosts, Linux x64, xunit.v3 3.2.2 on Microsoft.Testing.Platform Context: split out of #232. Version 18.11.2 fixed the issue reported there. The measurements are in this comment.
Summary
Each dotnet test --coverage run leaves small files in /tmp that are never removed: 52 on net8.0 and 54 on net10.0 in my runs. They are named /tmp/CodeCoverage.<session>.<guid>, have mode 0600, and are six bytes long, all containing 02 00 00 00 00 00.
TryDeleteBackingFile does remove the real coverage buffer (the 1,633-byte one in this test), so only these small files leak. For comparison, 18.10.0 left none behind under the same test configurations. On a CI runner or developer machine that runs tests repeatedly, they accumulate without bound.
Activity
build.sh Cleanup (#88)