[PATCH] D95246: [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests - continued

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 00:09:32 PST 2021


jhenderson added inline comments.


================
Comment at: clang/test/Driver/clang-offload-bundler.c:74
+// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -inputs=%t.i,%t.tgt1,%t.tgt2.notexist -outputs=%t.bundle.i 2>&1 | \
+// RUN:  FileCheck %s -DFILE=%t.tgt2.notexist -DMSG=%errc_ENOENT --check-prefix CK-ERR5
+// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.i,%t.tgt1,%t.tgt2 -inputs=%t.bundle.i.notexist -unbundle 2>&1 | \
----------------
Add one more space - it helps the indentation stand out more and therefore make it clearer this line is a continuation.


================
Comment at: clang/test/Driver/clang-offload-bundler.c:76
+// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.i,%t.tgt1,%t.tgt2 -inputs=%t.bundle.i.notexist -unbundle 2>&1 | \
+// RUN:  FileCheck %s -DFILE=%t.bundle.i.notexist -DMSG=%errc_ENOENT --check-prefix CK-ERR5
+// CK-ERR5: error: '[[FILE]]': [[MSG]]
----------------



================
Comment at: llvm/docs/TestingGuide.rst:545-547
+   Example (%errc_ENOENT): ``No such file or directory``
+
+   Example (%errc_ENOENT): ``no such file or directory``
----------------
jhenderson wrote:
> This is a slightly different format to the other examples above. I think it should be like the inline edit. this also helps distinguish the difference between the two.
> 
> Note: I can't remember which way around the two versions are, so you might need to swap them!
We probably need to list what error codes are currently supported somewhere.


================
Comment at: llvm/utils/lit/lit/llvm/config.py:349-351
+        triple = ""
+        if hasattr(self.config, 'host_triple'):
+            triple = self.config.host_triple
----------------
abhina.sreeskantharajan wrote:
> jhenderson wrote:
> > I'm concerned that someone might start using these substitutions in a project for the first time, and get confused why they don't work on non-windows platforms. Maybe the solution is simply to require LLVM_HOST_TRIPLE to be set in all projects, i.e. go back to what you were doing before, and letting python fail if it isn't set.
> > 
> > Happy to hear other ideas too.
> I think using sys.platform or platform.system() could be a better alternative. What do you think?
Makes sense to me. Slight issue: cygwin on Windows uses `cygwin`. What error message does it produce though?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95246



More information about the llvm-commits mailing list