[LLVMdev] [cfe-dev] 3.6.2-rc1 has been tagged. Testers needed.
Dan Liew
dan at su-root.co.uk
Mon Jul 6 23:10:14 PDT 2015
On 6 July 2015 at 22:26, Dan Liew <dan at su-root.co.uk> wrote:
> Hi,
>
> @CC'ing Hans because this will likely be of interest to you.
>
> Right I've started trying to build LLVM inside an Ubuntu chroot
> (Ubuntu 14.04LTS Docker image) and I've already come across a pretty
> bad bug in the ``test-release.sh`` script which potentially means that
> builds and/or tests could potentially fail without anyone noticing
> (unless someone carefully looks through the logs) because in certain
> places if the build process fails the script will carry on executing
> as if nothing bad happened!
>
> The script contains ``set -e`` which is **supposed** to exit if any
> command fails. However because of the way the script is implemented
> this doesn't work. When commands are piped through the ``tee`` command
> (which the script does for many parts of the build process) the exit
> code is not exit code of the process of interest (e.g. the ``make`` or
> ``configure`` invocations).
>
> Here's a simple example that illustrates the problem
>
> ```
> $ false ; echo $?
> 1
> false | tee /dev/null ; echo $?
> 0
> ```
>
> In addition to doing ``set -e`` what we also need to do ``set -o
> pipefail`` in the ``test-release.sh`` script.
>
> ```
> $ set -o pipefail
> $ false ; echo $?
> 1
> $ false | tee /dev/null ; echo $?
> 1
> ```
>
> Is it okay for me to commit a fix for this to trunk?
@dimitry: Could you tell me if
set -o pipefail
works under the FreeBSD? I seem to recall that FreeBSD does not use
bash by default so I'm not sure what the ``test-release.sh`` script
shebang actually invokes under FreeBSD. Is it real bash or is it some
bourne compatible shell?
More information about the llvm-dev
mailing list