Skip to content

Refuse Every Argument Before Any Read in the RegressionTests Scripts #1306

Done

Description

@ptr727

CODESTYLE.md "Command-Line Arguments" requires an unrecognized argument to be refused before any read or write. Two RegressionTests scripts refuse some arguments only after other work.

regression-test.sh

The tag, corpus, and plugin arguments are validated near the end of the script, after the host lookups id -u nonroot and getent group users. On a host with no nonroot user, regression-test.sh quick develop bogus exits 1 with the lookup's error and never names bogus. Moving the positional validation ahead of the host lookups refuses it with 64, as --help states.

integration-test.sh

The dash-prefixed check reads only the first argument. A dash-prefixed second argument becomes WORKDIR, so integration-test.sh plexcleaner:local -x reaches mkdir -p "$work/media". That mkdir reads it as an option and exits 1, rather than the script refusing it with 64. Checking every argument for a leading dash, as regression-test.sh does, fixes it.

Both orderings predate the exit status 64 change in #1301, which kept them.

Activity

  1. added
    pre-existing
    on Nov 26, 2026
  2. added a commit that references this issue on Nov 26, 2026
    52c9574
  3. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Fixed in #1308, squash-merged into develop as 52c9574.

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

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions