Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Each coverage run leaves ~50 six-byte /tmp/CodeCoverage.* files behind on Linux (18.11.x)

Aberta
#252 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
65/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp
Domínio
testing-qa

Direção de pesquisa

Reproduce the leak with dotnet test --coverage on Linux using the reported .NET 8 or .NET 10 matrix, then inspect the TryDeleteBackingFile cleanup path. Done means repeated coverage runs remove the six-byte /tmp/CodeCoverage.* files while preserving cleanup of the real coverage buffer.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
126
Forks
17
Merge médio
1h 13min
PRs com merge (30d)
2

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/codecoverage

Todas as issues de microsoft/codecoverage

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.