Skip to content

Relax exit code 8 (zero tests) for skipped tests #9385

Description

The original design for the exit code 8 (zero tests ran) was to check the total test count, and fail if it's zero.

At some point, the logic shifted from totalCount == 0 to totalCount == skippedCount.

I don't personally see much point of that and I think the original design we had made more sense.

Activity

  1. added
    needs/triage
    on Jun 24, 2026
  2. MihuBot commented on Jun 24, 2026

    @MihuBot

    I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

  3. Evangelink commented on Jun 24, 2026

    @Evangelink
    Member

    Thinking more about it, I think both scenario make sense and that overall we mainly want to protect against filters that would be excluding all tests.

    This would be a potential breaking change and I can see how that could still be useful to fail when you run no tests (maybe you can exclude the asm then and save more time).

    So my suggestion is to keep the current behavior and introduce a new parameter to count skipped tests or not. In the next major release, we would flip this argument.

  4. Youssef1313 commented on Jun 24, 2026

    @Youssef1313
    MemberAuthor

    I honestly don't agree with the current behavior and find it more annoying that useful, and we have had many users (internal and external) complaining about it in the past before. It's also not worth having an additional option to control the behavior. The defaults should be what most cases need, and additional options/configuration should only be added if absolutely needed.

  5. Youssef1313 commented on Jun 24, 2026

    @Youssef1313
    MemberAuthor

    The original issue, IMO, that we wanted to guard against, is bad configurations that will lead to running nothing. e.g, empty entry point (if you reference VSTest that will generate an empty entrypoint and you disable MTP entrypoint generation), and similar.

  6. Evangelink commented on Jun 24, 2026

    @Evangelink
    Member

    Agreeing or not is not going to change the fact we have a behavior and changing it is a breaking change that I don't want to do in minor version. I'll introduce a flag that can workaround this and change default behavior in the next major.

  7. added
    area/mtp
    on Jun 24, 2026
  8. Youssef1313 commented on Jun 24, 2026

    @Youssef1313
    MemberAuthor

    We already changed the behavior in the past in a minor release, which was even more breaking as non-error scenario became error scenario. The change here is much less of a break IMO. But up to you to decide to delay this to 5.x

  9. Evangelink commented on Jun 24, 2026

    @Evangelink
    Member

    Alright so I have been looking at the various usage of --ignore-exit-code 8 and they fall under the 2 categories quotes previously:

    • test asms with only skipped tests
    • filters excluding all tests

    I am still a bit mixed about the breaking change but given the ones that were done in past falls under the bucket of "can be considered as fixing a bug" I guess we could do the same.

    As I am adding the new option, people can still bring back old behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mtp

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions