This is less error-prone to mask settings than stat.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
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 ↗ | (On Diff #126467) | "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 ↗ | (On Diff #126467) | I think you can remove FileCheck and just do RUN: [ ! -x %t1.o ] because lit checks its subprocesses exit codes. |
8 ↗ | (On Diff #126467) | Likewise, just RUN: [ -x %t2.so ] |