Skip to content

Deny special FileCheck suffixes being used as revision names. #130982

Description

@jieyouxu

FileCheck expects directives like:

// COM:
// CHECK:
// CHECK-NEXT:
// CHECK-SAME:
// CHECK-EMPTY:
// CHECK-NOT:
// CHECK-COUNT:
// CHECK-DAG:
// CHECK-LABEL:

compiletest supports //@ revisions: a b c and passes the revision names as --check-prefixes=a,b,c to FileCheck. They look like

// a:
// b-NOT:
// c-SAME:

However, FileCheck has special default/reserved prefixes like CHECK or COM, and if the test writer uses those as revision names, it becomes really confusing: //@ revisions: CHECK COM. We should deny those.

Also we should deny NEXT, SAME, EMPTY, NOT, COUNT, DAG and LABEL, because

// next:
// same-SAME:
// not-NOT:

is equally confusing.


Related to:

Activity

  1. added
    A-compiletestArea: The compiletest test runner
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Sep 28, 2024
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 28, 2024
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 28, 2024
  4. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    and removed
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Oct 17, 2024
  5. added
    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
    on Oct 29, 2024
  6. DavisRayM commented on Dec 30, 2024

    @DavisRayM
    Contributor

    @rustbot claim

  7. added a commit that references this issue on Jan 5, 2025
    78e681a
  8. added a commit that references this issue on Jan 5, 2025
    6911207
  9. changed the title [-]Deny special FileCheck prefixes being used as revision names.[/-] [+]Deny special FileCheck suffixes being used as revision names.[/+] on Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-compiletestArea: The compiletest test runnerC-bugCategory: This is a bug.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions