Skip to content

compiletest: FileCheck-based tests conflate FileCheck prefixes with compiletest revisions #134510

Open
@jieyouxu

Description

@jieyouxu

Auto-registering revision names as check prefix is a bit sketchy, and that having to pass --allow-unused-prefix is an unfortunate side-effect of not knowing whether the test author actually wanted revision-specific check prefixes or not.

-- #134463 (comment)

With the current scheme where compiletest //@ revisions imply FileCheck prefixes of the same names, we can't distinguish between whether the author wanted to:

  1. Use compiletest revisions but ONLY for compiletest directive purposes.
  2. Use compiletest revisions but ONLY for filecheck prefix purposes.
  3. Use compiletest revisions for BOTH purposes.

We might want to investigate splitting these orthogonal concepts and have something like //@ filecheck-prefixes: XXX register FileCheck prefixes separately.

Marked as E-hard as this will take quite a bit of investigation/design, and E-tedious as this probably involves updating a whole bunch of tests, and I don't have the bandwidth to mentor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.E-tediousCall for participation: An issue involves lots of work and is better handled as many small tasks.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions