bug-dejagnu
[Top][All Lists]
Advanced

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

bug#47382: runtest doesn't work with Solaris 10 /bin/sh (oops, forgot pa


From: Jacob Bachmeyer
Subject: bug#47382: runtest doesn't work with Solaris 10 /bin/sh (oops, forgot patch...)
Date: Fri, 16 Apr 2021 00:01:45 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

Rainer Orth wrote:
Running 
/vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/launcher.all/help.exp 
...
ERROR: The 'man' command in Solaris does not work in the source tree.
Running 
/vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/testsuite/launcher.all/interp.exp
 ...
FAIL: have no Awk
FAIL: have no GNU Awk
FAIL: have no Tcl
FAIL: have no Expect

Running "env AWK=bogus GAWK=bogus 
/vol/src/gnu/dejagnu/dejagnu-1.6.3-branch/local/dejagnu --DGTimpl awk" ...
child process exited abnormally
FAIL: have no Awk

Those FAILs happen because interp.exp expects exitcode 1 while we get
255 instead.  The autoconf manual documents this, too:

Don't expect @command{false} to exit with status 1: in native
Solaris @file{/bin/false} exits with status 255.

Fixed in commit 9539a1e2ffe8506b92bfcb4363c767e4bc6a0700:

8<----
diff --git a/dejagnu b/dejagnu
index 9f6ae4b..ece4e09 100755
--- a/dejagnu
+++ b/dejagnu
@@ -426,13 +426,13 @@ fi
if test -z "$command" ; then
    if test -n "$override_ext" ; then
       case $selected_ext in
-           awk)        $have_awk;      exit $? ;;
-           bash)       $have_bash;     exit $? ;;
-           exp)        $have_expect;   exit $? ;;
-           gawk)       $have_gawk;     exit $? ;;
-           tcl)        $have_tcl;      exit $? ;;
-           sh)         $have_sh;       exit $? ;;
-           *)                          exit  2 ;;
+           awk)    if $have_awk;       then exit 0; else exit 1; fi ;;
+           bash)   if $have_bash;      then exit 0; else exit 1; fi ;;
+           exp)    if $have_expect;    then exit 0; else exit 1; fi ;;
+           gawk)   if $have_gawk;      then exit 0; else exit 1; fi ;;
+           tcl)    if $have_tcl;       then exit 0; else exit 1; fi ;;
+           sh)     if $have_sh;        then exit 0; else exit 1; fi ;;
+           *)      exit 2 ;;
       esac
    else
       echo ERROR: no command given
8<----


That code did look suspiciously clever when I wrote it...


-- Jacob





reply via email to

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