Catching GMP test failures

Matt Burgess matthew at
Thu Feb 9 13:21:54 PST 2012

On Thu, 2012-02-09 at 21:53 +0100, Pierre Labastie wrote:
> .
> Hi,
> As far as generating the line, the patch is OK,
> but it seems to me that this command should make
> the script stop unconditionnally
> (with a zero exit status if the test succeeded and non zero otherwise).
> One way to achieve the desired behavior could be to run the
> line in a sub-shell (enclosing the line between parenthesis):
> (make check 2>&1 | tee gmp-check-log>>  $TEST_LOG 2>&1&&

Doh, of course!

> Another way could be to eliminate any piping to tee during the tests
> (testing the input line for '| tee'), since
> the output is recorded anyway in $TEST_LOG...
> I'd prefer this solution, otherwise we'd have to change how tests
> are handled on a case by case basis each time the book adds
> this kind of command (which was only in glibc when jhalfs was written)

The only issue with omitting the 'tee' is that we use the resultant
file, 'gmp-check-log' in the very next command.  We could add a
role="nodump" to the LFS book to prevent that but...

I notice that glibc-check-log is also used in a 'grep' immediately after
creation but I can't see how that doesn't end up in the generated
commands?  However that's done, I guess we should just duplicate for



More information about the alfs-discuss mailing list