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

tests: fix filecheck typos #125626

Closed
wants to merge 1 commit into from
Closed

Conversation

klensy
Copy link
Contributor

@klensy klensy commented May 27, 2024

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented May 27, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 27, 2024
Copy link
Member

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mh not able to understand why this is a typo?

@klensy
Copy link
Contributor Author

klensy commented May 27, 2024

As noted in readme (https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-label-directive), FileCheck require colon after directive, otherwise it will skip line.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-17 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 30.1s done
#16 DONE 42.6s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
failures:

---- [mir-opt] tests/mir-opt/unnamed-fields/field_access.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-17/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir" "/checkout/tests/mir-opt/unnamed-fields/field_access.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/mir-opt/unnamed-fields/field_access.rs:42:12: error: CHECK: expected string not found in input
/checkout/tests/mir-opt/unnamed-fields/field_access.rs:42:12: error: CHECK: expected string not found in input
 // CHECK: [[a:_.*]] = (_1.0: u8);
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir:33:8: note: scanning from here
fn foo(_1: Foo) -> () {
       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir:35:2: note: possible intended match here
 let mut _0: ();
/checkout/tests/mir-opt/unnamed-fields/field_access.rs:59:12: error: CHECK: expected string not found in input
/checkout/tests/mir-opt/unnamed-fields/field_access.rs:59:12: error: CHECK: expected string not found in input
 // CHECK: [[a:_.*]] = (_1.0: u8);
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir:50:8: note: scanning from here
fn bar(_1: Bar) -> () {
       ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir:52:2: note: possible intended match here
 let mut _0: ();

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/unnamed-fields/field_access/field_access.mir
Check file: /checkout/tests/mir-opt/unnamed-fields/field_access.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: // WARNING: This output format is intended for human consumers only 
            2: // and is subject to change without notice. Knock yourself out. 
            3: Foo::{anon_adt#1}::{anon_adt#0}::d::{constant#0}: usize = { 
            4:  let mut _0: usize; 
            5:  
            6:  bb0: { 
            7:  _0 = const 1_usize; 
            8:  return; 
            9:  } 
           10: } 
           11:  
           12: Bar::{anon_adt#1}::{anon_adt#0}::d::{constant#0}: usize = { 
           13:  let mut _0: usize; 
           14:  
           15:  bb0: { 
           16:  _0 = const 1_usize; 
           17:  return; 
           18:  } 
           19: } 
           20:  
           21: fn access(_1: T) -> () { 
           22:  let mut _0: (); 
           23:  
           24:  bb0: { 
           25:  drop(_1) -> [return: bb1, unwind continue]; 
           26:  } 
           27:  
           28:  bb1: { 
           29:  return; 
           30:  } 
           31: } 
           32:  
           33: fn foo(_1: Foo) -> () { 
check:42'0            X~~~~~~~~~~~~~~~~ error: no match found
           34:  debug foo => _1; 
check:42'0     ~~~~~~~~~~~~~~~~~~
           35:  let mut _0: (); 
check:42'0     ~~~~~~~~~~~~~~~~~
check:42'1      ?                possible intended match
           36:  scope 1 (inlined access::<u8>) { 
check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           37:  } 
check:42'0     ~~~
           38:  scope 2 (inlined access::<i8>) { 
check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  } 
check:42'0     ~~~
           40:  scope 3 (inlined access::<bool>) { 
check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           41:  } 
check:42'0     ~~~
           42:  scope 4 (inlined access::<[u8; 1]>) { 
check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           43:  } 
check:42'0     ~~~
check:42'0     ~
check:42'0     ~
           45:  bb0: { 
check:42'0     ~~~~~~~~
           46:  return; 
check:42'0     ~~~~~~~~~
           47:  } 
check:42'0     ~~~
           48: } 
check:42'0     ~~
check:42'0     ~
check:42'0     ~
           50: fn bar(_1: Bar) -> () { 
check:42'0     ~~~~~~~
check:59'0            X~~~~~~~~~~~~~~~~ error: no match found
           51:  debug bar => _1; 
check:59'0     ~~~~~~~~~~~~~~~~~~
           52:  let mut _0: (); 
check:59'0     ~~~~~~~~~~~~~~~~~
check:59'1      ?                possible intended match
           53:  scope 1 (inlined access::<u8>) { 
check:59'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  } 
check:59'0     ~~~
           55:  scope 2 (inlined access::<i8>) { 
check:59'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  } 
check:59'0     ~~~
           57:  scope 3 (inlined access::<bool>) { 
check:59'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  } 
check:59'0     ~~~
           59:  scope 4 (inlined access::<[u8; 1]>) { 
check:59'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           60:  } 
check:59'0     ~~~
check:59'0     ~
check:59'0     ~
           62:  bb0: { 
check:59'0     ~~~~~~~~
           63:  return; 
check:59'0     ~~~~~~~~~
           64:  } 
check:59'0     ~~~
           65: } 
check:59'0     ~~
check:59'0     ~
           67: fn main() -> () { 
check:59'0     ~~~~~~~~~~~~~~~~~~
           68:  let mut _0: (); 
           68:  let mut _0: (); 
check:59'0     ~~~~~~~~~~~~~~~~~
           69:  
check:59'0     ~
           70:  bb0: { 
check:59'0     ~~~~~~~~
           71:  return; 
check:59'0     ~~~~~~~~~
           72:  } 
check:59'0     ~~~
           73: } 
check:59'0     ~~
------------------------------------------



@vincenzopalazzo
Copy link
Member

As noted in readme (https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-label-directive), FileCheck require colon after directive, otherwise it will skip line.

Maybe better ad it as a commit body + PR description

@bors
Copy link
Contributor

bors commented May 31, 2024

☔ The latest upstream changes (presumably #125759) made this pull request unmergeable. Please resolve the merge conflicts.

@Mark-Simulacrum
Copy link
Member

r=me

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 16, 2024
@Dylan-DPC
Copy link
Member

@klensy any updates on this? thanks

@jieyouxu
Copy link
Member

jieyouxu commented Aug 17, 2024

cc #128018
EDIT: opened #130981.

@alex-semenyuk
Copy link
Member

@klensy
From wg-triage. Closed this PR due to inactivity. Feel free to reopen or raised new one. Thanks for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants