automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] tests: fix a spurious failure with dash


From: Eric Blake
Subject: Re: [PATCH 5/5] tests: fix a spurious failure with dash
Date: Mon, 07 May 2012 11:27:24 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/01/2012 10:04 AM, Stefano Lattarini wrote:
> The dash shell, at least version 0.5.5.1, doesn't always bail out
> with a syntax error when a stray "fi" in encountered:
> 
>   $ dash -c ":; fi"; echo stat = $?
>   stat = 0
> 
> See also the relevant bug report:
> 
>   <http://permalink.gmane.org/gmane.comp.shells.dash/717>
> 
> This behaviour was causing a spurious error in our testsuite.  Fix it.
> 
> * t/self-check-exit.tap: Use a stray parentheses rather than a stray
> 'fi' to trigger a syntax error.
> 
> Signed-off-by: Stefano Lattarini <address@hidden>
> ---
>  t/self-check-exit.tap |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap
> index 1342f07..f58493f 100755
> --- a/t/self-check-exit.tap
> +++ b/t/self-check-exit.tap
> @@ -97,7 +97,7 @@ command_ok_ "permission denied" test $? -gt 0
>  : Syntax errors in the test code.
>  $AM_TEST_RUNNER_SHELL -c "$init; if :; then" "$dummy_test_script"
>  command_ok_ "syntax error 1" test $? -gt 0
> -$AM_TEST_RUNNER_SHELL -c "$init; fi" "$dummy_test_script"
> +$AM_TEST_RUNNER_SHELL -c "$init; true ( true )" "$dummy_test_script"

ACK.  Does the autoconf testsuite suffer from any of the same
assumptions about being able to trigger a syntax error?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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