This is less error-prone to mask settings than stat.
Details
Details
Diff Detail
Diff Detail
- Repository
- rLLD LLVM Linker
Event Timeline
Comment Actions
LGTM
I believe it's still fragile against weird umask setting (such as 444), but that's in practice not an issue.
Don't you need to run this only on Unix?
Comment Actions
I wonder if replacing gnustat with shell and use [ -x <filename> ] is more robust than using gnustat. At least there's a precedence in clang/test/Driver/target-override.c.
Comment Actions
LGTM
test/ELF/file-access.s | ||
---|---|---|
1 | "shell" means basically "non-Windows", so I don't think you need "linux". This test should work fine on any Unix or on macOS. | |
5–6 | I think you can remove FileCheck and just do RUN: [ ! -x %t1.o ] because lit checks its subprocesses exit codes. | |
8 | Likewise, just RUN: [ -x %t2.so ] |
"shell" means basically "non-Windows", so I don't think you need "linux". This test should work fine on any Unix or on macOS.