Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jieyouxu opened this issue Sep 28, 2024 · 1 comment · May be fixed by #134925
Open

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

jieyouxu opened this issue Sep 28, 2024 · 1 comment · May be fixed by #134925
Assignees
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Sep 28, 2024

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:

@jieyouxu jieyouxu added A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 28, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 28, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 28, 2024
@jieyouxu jieyouxu added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 17, 2024
@jieyouxu jieyouxu added the E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. label Oct 29, 2024
@DavisRayM
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Development

Successfully merging a pull request may close this issue.

3 participants