[PATCH] D123998: llvm-reduce: Try to parse triple/datalayout from module

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 16:18:33 PDT 2022


haowei added a comment.

Hi,

We are seeing test failures on Fuchsia Clang builder for windows-x64 after this change have landed.

Failed tests are:

  LLVM :: tools/llvm-reduce/fail-file-open.test
  LLVM :: tools/llvm-reduce/mir/infer-triple-unknown-target.mir

Error messages:

  Script:
  --
  : 'RUN: at line 1';   not llvm-reduce --test=echo C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test.NotAFileInTestingDir 2>&1 | c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "not" "llvm-reduce" "--test=echo" "C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test.NotAFileInTestingDir"
  $ "c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe" "C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test"
  # command stderr:
  C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test:5:10: error: CHECK: expected string not found in input
  # CHECK: llvm-reduce: {{.*}}.NotAFileInTestingDir: error:
           ^
  <stdin>:1:1: note: scanning from here
  llvm-reduce.exe: C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test.NotAFileInTestingDir: error: Could not open input file: no such file or directory
  ^
  <stdin>:1:81: note: possible intended match here
  llvm-reduce.exe: C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test.NotAFileInTestingDir: error: Could not open input file: no such file or directory
                                                                                  ^
  
  Input file: <stdin>
  Check file: C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<<<<<
             1: llvm-reduce.exe: C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\fail-file-open.test.NotAFileInTestingDir: error: Could not open input file: no such file or directory 
  check:5'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
  check:5'1                                                                                     ?                                                                                                     possible intended match
  >>>>>>
  
  error: command failed with exit status: 1
  
  --

and

  Script:
  --
  : 'RUN: at line 1';   not llvm-reduce --test c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir -o /dev/null 2>&1 | c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "not" "llvm-reduce" "--test" "c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe" "C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir" "-o" "/dev/null"
  $ "c:\b\s\w\ir\x\w\staging\llvm_build\bin\filecheck.exe" "C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir"
  # command stderr:
  C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir:3:10: error: CHECK: expected string not found in input
  # CHECK: llvm-reduce: error: unable to get target for 'omgwtfbbqcpu64--', see --version and --triple.
           ^
  <stdin>:1:1: note: scanning from here
  llvm-reduce.exe: error: unable to get target for 'omgwtfbbqcpu64--', see --version and --triple.
  ^
  
  Input file: <stdin>
  Check file: C:\b\s\w\ir\x\w\llvm-llvm-project\llvm\test\tools\llvm-reduce\mir\infer-triple-unknown-target.mir
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<<<<<
           1: llvm-reduce.exe: error: unable to get target for 'omgwtfbbqcpu64--', see --version and --triple. 
  check:3     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
  >>>>>>
  
  error: command failed with exit status: 1
  
  --

It is quite obvious that both tests did not consider that Windows has ".exe" suffix to its executables

Could you fix the breaking tests? If it takes a while to fix, could you revert your change please? Thanks.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123998/new/

https://reviews.llvm.org/D123998



More information about the llvm-commits mailing list