Skip to content

Killing cargo test midway can leave target in unstable stage #7767

@akhi3030

Description

@akhi3030

Problem

It appears that if you kill (with a SIGINT signal) a cargo test midway, it can leave the target directory in an unusable state. There are a bunch of empty files lying about which confuse subsequent cargo test` runs.

Subsequent cargo test runs fail with errors like these:

$ cargo test
...
error: could not execute process `.../target/debug/deps/client-0e2e62dd0088de51` (never executed)

Caused by:
  Permission denied (os error 13)

The error seems to be pointing to empty files in the directory. Manually deleting them makes the problem go away.

Possible Solution(s)

Maybe cargo test could try to catch the SIGINT signal and tidy up the directory before exiting.

Notes

Output of cargo version: 1.39.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rebuild-detectionArea: rebuild detection and fingerprintingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions