[PATCH] D41097: [ELF] Use shell to check the file permissions
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 16:27:57 PST 2017
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: test/ELF/file-access.s:1
-# REQUIRES: x86, gnustat
+# REQUIRES: x86, linux, shell
----------------
"shell" means basically "non-Windows", so I don't think you need "linux". This test should work fine on any Unix or on macOS.
================
Comment at: test/ELF/file-access.s:5-6
# RUN: ld.lld -r %t.o -o %t1.o
-# RUN: stat -c %%A %t1.o | FileCheck --check-prefix=CHECK-RELOC %s
-# CHECK-RELOC: -rw-r--r--
+# RUN: [ ! -x %t1.o ] && echo "n" | FileCheck --check-prefix=CHECK-RELOC %s
+# CHECK-RELOC: n
# RUN: ld.lld -shared %t.o -o %t2.so
----------------
I think you can remove FileCheck and just do
RUN: [ ! -x %t1.o ]
because lit checks its subprocesses exit codes.
================
Comment at: test/ELF/file-access.s:8
# RUN: ld.lld -shared %t.o -o %t2.so
-# RUN: stat -c %%A %t2.so | FileCheck --check-prefix=CHECK-SHARED %s
-# CHECK-SHARED: -rwxr-xr-x
+# RUN: [ -x %t2.so ] && echo "y" | FileCheck --check-prefix=CHECK-SHARED %s
+# CHECK-SHARED: y
----------------
Likewise, just
RUN: [ -x %t2.so ]
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41097
More information about the llvm-commits
mailing list