Skip to content

Test exit code should distinguish between failed test and bad args #67210

Open
@tmandry

Description

@tmandry

Today, if I run a test binary with bad args like --foo-bar, it prints an error message and exits with code 101. Similarly, if I run a test binary correctly but one of the tests fails, it logs the test failure and exits with 101.

It would be nice if we could distinguish between these cases using only the exit code.

Hopefully nothing depends on either of those cases being exactly 101 today, but if we change the code to distinguish between them, we should probably document it and keep it stable from then on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions