Kiyoshi KANAZAWA wrote:
Hello,
Tried dejagnu-1.6.3-rc4 on Solaris x86/x64 with many SHELLs & found
make check fails with SHELL=/bin/csh,
which does not occur with dejagnu-1.6.3-rc3.
I know csh is not recommend, but still have to say something changed worse.
The root cause of this issue is a program called "shellcheck" and the
decision by the maintainers of config.guess to take its advice and break
backwards compatibility with pre-POSIX shells, while Solaris 10 /bin/sh
is still a pre-POSIX shell, leading to bug#47382 when I imported the
newer config.guess in preparation for the 1.6.3 release. Now DejaGnu
must find some way to choose a shell that can run config.guess and use
it for that purpose if config.guess must be run.
DejaGnu is installed in an architecture-independent tree, so
substitutions made by configure are not acceptable here: the installed
DejaGnu can be shared with other machines after installation.
The solution adopted in 1.6.3-rc4 is to check the environment for
variables named CONFIG_SHELL and SHELL (in that order) and use the first
one found to run config.guess, falling back to simply running
config.guess directly (which will use /bin/sh) if neither is set.
Obviously, this causes problems if CONFIG_SHELL is not set and $SHELL is
not a POSIX Bourne shell. In an effort to limit those problems, runtest
now also checks that the output of config.guess looks plausible and
aborts very early if it does not.
I am very interested in the "Native configuration is ..." line from
"make check" in the failing case; runtest should detect that
config.guess did not produce a valid result and abort instead of running
any tests at all.
I see a few options:
1. Check $SHELL (apparently [exec $::env(SHELL) -c {A=$(echo X); B=Y;
echo $A${B}Z}] should be enough to exclude csh and non-POSIX Bourne
shells, producing "XYZ" if $SHELL is acceptable) and either:
1a. Unset SHELL if the check fails. This would mean that testsuites
could depend on SHELL naming a POSIX Bourne shell if it is set during a
testing run.
1b. Immediately bail out if the check fails, informing the user that
CONFIG_SHELL must be set to the executable name of a POSIX Bourne shell
if SHELL is set to something else.
2. Improve the error message produced when config.guess fails to run to
explain that CONFIG_SHELL must be set to the executable name of a POSIX
Bourne shell if SHELL is set to something else.
The 1a option does lead to possible future support for /finding/ a POSIX
Bourne shell and thus allowing testsuites to expect that SHELL will be a
"standard" shell.
-- Jacob
_______________________________________________
Bug-dejagnu mailing list
Bug-dejagnu@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-dejagnu