autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another ash braindamage (testsuite only)


From: Akim Demaille
Subject: Re: Another ash braindamage (testsuite only)
Date: 12 Oct 2000 09:42:08 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

| Hello!

Hi Pavel!

| The testsuite uses a construct "$at_failed && exit 1" where
| at_failed="false" for successful tests.
| 
| The problem is that the code immediately after that relies on $?. In fact,
| $? is normally (in bash) reset to 0 by executing $at_traceon, which is
| normally empty because at_traceon is not set.

What code are you referring to?  Who is depending upon $? after
running this?  Could you develop?

| This is too fragile to be portable. This script prints 0 under bash and 1
| under ash-0.2 (but not ash-0.3.4 and above):
| 
| #! /bin/sh
| false
| $FOO
| echo $?

This should be described in the documentation, along with all the
limitations you've already discovered :)

| The fix is to use "if" with ":" in the "else" part.

Grmph.  Yet another thing to document.

        Akim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]