[cfe-dev] 3.6.2-rc1 has been tagged. Testers needed.

Dan Liew dan at su-root.co.uk
Mon Jul 6 22:26:57 PDT 2015


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?


@Ben: Could you add a line just after ``set -e`` in your copy of
``test-release.sh`` that runs ``set -o pipefail`` and try another
build using this patched script? This might not be the cause of the
packaging problems you're having but I suspect that it might be the
case that your build is failing in someway inside your chroot and that
the ``test-release.sh`` script is just carrying on regardless of this
failure resulting in a broken tarball being generated.


Thanks,
Dan.



More information about the cfe-dev mailing list