view test/Other/can-execute.txt @ 108:1881386f7909

use llvm.setjmp and llvm.longjmp
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Mon, 01 Feb 2016 02:57:01 +0900
parents 95c75e76d11b
children 803732b1fca8
line wrap: on
line source

REQUIRES: can-execute

This tests that we abstract two peculiarities of unix in can_execute:

* Directories are executable, but we don't want to try to execute them.
* For shell scripts, we also need to be able to read them.

The PATH is constructed such that 'not' will first find a directory named
TestProg, then a file with executable bit but not readable and finally a
shell script which always returns false, which is what it actually tries to
execute.

If we want, it is probably OK to change the semantics of can_execute and this
test, but for now this test serves as a reminder to audit all the callers if
we do that.

RUN: cp -f %S/Inputs/TestProg/TestProg %T/TestProg
RUN: chmod 111 %T/TestProg
RUN: export PATH=%S/Inputs:%T:%S/Inputs/TestProg:$PATH
RUN: not TestProg