autoconf-patches
[Top][All Lists]
Advanced

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

Re: NetBSD test results: AS_EXIT failure


From: Ralf Wildenhues
Subject: Re: NetBSD test results: AS_EXIT failure
Date: Tue, 13 Jan 2009 23:37:11 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Eric,

* Eric Blake wrote on Tue, Jan 13, 2009 at 02:21:17PM CET:
> According to Ralf Wildenhues on 1/11/2009 5:14 AM:
> > $ sh -x script d e ; echo $?

> > + test xd '=' xd
> > + trap 's=$?; echo $s; as_fn_exit $s' 0
> > + test xe '=' xe
> > + set '-e'
> > + test 2 '-gt' 0
> > + 'as_fn_set_status' 3
> > + return 3
> > + 's=3'
> > 3
> > 
> > I'm not quite sure what's happening here.  It's anyway not such a big
> > problem, so it may be best to just SKIP the test in this case.  If
> > analyzed better, it should be reported to the NetBSD people though.
> 
> What sort of condition would we use to skip the test?   It looks like the
> trap starts execution (the trace includes s=3), but fails to do the echo.
>   Maybe it's worth reporting even if we don't know what's wrong, in case
> the NetBSD shell team has seen this before.

I agree; I'll file a report once I'm through checking that it's not
already reported (there are several 'set -e'-related bugs there).

As to how to skip the test, how about this patch?

Thanks,
Ralf

    Ignore `set -e'-related failure of NetBSD sh.
    
    * tests/m4sh.at (AS@&address@hidden): Skip test if (NetBSD) shell
    fails to finish EXIT trap after set -e.

diff --git a/tests/m4sh.at b/tests/m4sh.at
index daedc0e..f34c722 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -334,8 +334,9 @@ dnl portability nightmares on what constructs are 
considered errors across
 dnl various shells; therefore, an overall SKIP result is desirable on
 dnl broken shells like Solaris /bin/sh.
 AT_CHECK([./script '' e], [3])
-AT_CHECK([./script d e], [3], [[3
-]])
+AT_CHECK([./script d e], [3], [stdout])
+dnl NetBSD sh fails to output on stderr here.
+AT_CHECK([grep 4 stdout || exit 77], [], [ignore])
 
 AT_CLEANUP
 




reply via email to

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