Skip to content

Trx and Ctrf post-processors can throw for dangling merged-directory links #10733

Closed

Description

Describe the bug

TrxArtifactPostProcessor and CtrfArtifactPostProcessor call Directory.CreateDirectory for the fixed merged output directory without handling file-system failures. On Linux, a dangling directory symbolic link at that path causes Directory.CreateDirectory to throw IOException, allowing artifact post-processing to fail the test run instead of returning no merged artifact.

This conflicts with RFC 018's requirement that post-processing failures must not fail the run. The HTML and JUnit post-processors already handle IOException and UnauthorizedAccessException for this operation.

Version used

Current main branch.

Steps To Reproduce

  1. On Linux, create an artifact post-processing output directory.
  2. Create a dangling directory symbolic link named merged inside it.
  3. Invoke either TrxArtifactPostProcessor.ProcessAsync or CtrfArtifactPostProcessor.ProcessAsync with two valid inputs.
  4. Observe that Directory.CreateDirectory(mergedDirectory) throws IOException.

Expected behavior

The processor returns null, preserves the input artifacts, and does not fail the test run.

Actual behavior

An IOException escapes from artifact post-processing.

Additional context

Discovered while reviewing #10731, which adds equivalent dangling-link regression coverage for the HTML post-processor. The fix should align Trx and Ctrf with the existing HTML/JUnit fail-closed behavior and add mutation-sensitive tests at both call sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions