llvm.org GIT mirror llvm / b6a633c
Add a testcase for r184074. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184080 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 REQUIRES: shell
1
2 This tests that we abstract two peculiarities of unix in can_execute:
3
4 * Directories are executable, but we don't want to try to execute them.
5 * For shell scripts, we also need to be able to read them.
6
7 The PATH is constructed such that 'not' will first find a directory named
8 TestProg, then a file with executable bit but not readable and finally a
9 shell script which always returns false, which is what it actually tries to
10 execute.
11
12 If we want, it is probably OK to change the semantics of can_execute and this
13 test, but for now this test serves as a reminder to audit all the callers if
14 we do that.
15
16 RUN: cp -f %S/Inputs/TestProg/TestProg %T/TestProg
17 RUN: chmod 111 %T/TestProg
18 RUN: export PATH=%S/Inputs:%T:%S/Inputs/TestProg:$PATH
19 RUN: not TestProg