Skip to content

MTP command-line parsing is possibly buggy #7039

@Youssef1313

Description

@Youssef1313

In the start of Main (e.g, easiest in Playground in this repo), add the following:

        args = [
            "--results-directory",
            "TestResults",
            """
            --filter FullyQualifiedName~MyFQN
            """, "--server", "dotnettestcli"];

Then check the created CommandLineParseResult in CommandLineParser.Parse:

Image

The filter is swallowed.

Then, change Main to:

        args = [
            "--results-directory",
            "TestResults",
            """
            --filter FullyQualifiedName~MyFQN
            """];

The filter won't be swallowed.

  1. In all cases, I think we shouldn't swallow anything in our parsing.
  2. It's questionable if --command-line-option value should really be handled when they are escaped together as a single argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MTPBelongs to the Microsoft.Testing.Platform core library

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions