GNU bug report logs -
#48155
[dejagnu-1.6.3-rc4] make check depends on SHELL
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48155 in the body.
You can then email your comments to 48155 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Sun, 02 May 2021 08:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>
:
New bug report received and forwarded. Copy sent to
bug-dejagnu <at> gnu.org
.
(Sun, 02 May 2021 08:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
$ uname -a
SunOS hidden 5.11 11.3 i86pc i386 i86pc
$ gcc --version
gcc (GCC) 10.3.0
$ echo $SHELL
/bin/sh
$ ./configure CC=gcc
$ make
$ make check
:
=== runtest Summary ===
# of expected passes 294
DejaGnu version 1.6.3-rc4
Expect version 5.45.4
Tcl version 8.6
On the other hand,
$ SHELL=/bin/csh export SHELL
$ ./configure CC=gcc
$ make
$ make check
:
=== runtest Summary ===
# of expected passes 258
# of unexpected failures 36
DejaGnu version 1.6.3-rc4
Expect version 5.45.4
Tcl version 8.6
Regards,
--- Kiyoshi
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Tue, 04 May 2021 04:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 48155 <at> debbugs.gnu.org (full text, mbox):
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
Owner recorded as jcb62281 <at> gmail.com.
Request was from
Jacob Bachmeyer <jcb62281 <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 04 May 2021 04:19:02 GMT)
Full text and
rfc822 format available.
Severity set to 'serious' from 'normal'
Request was from
Jacob Bachmeyer <jcb62281 <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 04 May 2021 04:19:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-dejagnu <at> gnu.org, jcb62281 <at> gmail.com
:
bug#48155
; Package
dejagnu
.
(Tue, 04 May 2021 06:34:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Hello,
I remember once received a similar bug report from a csh user about another GNU software.
At that time, it was possible to avoid error with either
./configure SHELL=/bin/sh
or
./configure CONFIG_SHELL=/bin/sh
Tried above using csh as user shell, but in vain.
May be the difference is whether SHELL and CONFIG_SHELL are exported when specified as configure command line argument.
--- Kiyoshi
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 01:26:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Kiyoshi KANAZAWA wrote:
> I remember once received a similar bug report from a csh user about another GNU software.
> At that time, it was possible to avoid error with either
> ./configure SHELL=/bin/sh
> or
> ./configure CONFIG_SHELL=/bin/sh
>
> Tried above using csh as user shell, but in vain.
> May be the difference is whether SHELL and CONFIG_SHELL are exported when specified as configure command line argument.
DejaGnu cannot rely on anything from configure because DejaGnu is
installed in /usr/share and one installation is allowed to be shared
across multiple machines. SHELL and/or CONFIG_SHELL must be set in the
environment when running DejaGnu to have any effect.
There should be an error if $SHELL is an unusable shell and CONFIG_SHELL
is not set; no summary should have been produced. What was the
configuration DejaGnu reported in that case? There should be a line
beginning "Native configuration is" and something; could you please
paste that line? It should be included in the first few lines of
runtest.log; could you run "head -4 runtest.log" after the test fails
and paste the output?
-- Jacob
Information forwarded
to
bug-dejagnu <at> gnu.org, jcb62281 <at> gmail.com
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Hello,
When $SHELL=/bin/csh & CONFIG_SHELL is not set,
$ head -4 runtest.log
Test run by foo on Wed May 5 11:54:07 2021
Native configuration is timestamp=2021-01-25: Command not found
Variable syntax
If $SHELL=/bin/csh & $CONFIG_SHELL=/bin/sh,
$ head -4 runtest.log
Test run by foo on Wed May 5 11:57:34 2021
Native configuration is i386-pc-solaris2.11
=== runtest tests ===
Regards,
--- Kiyoshi
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 03:40:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Kiyoshi KANAZAWA wrote:
> Hello,
>
> When $SHELL=/bin/csh & CONFIG_SHELL is not set,
> $ head -4 runtest.log
> Test run by foo on Wed May 5 11:54:07 2021
> Native configuration is timestamp=2021-01-25: Command not found
> Variable syntax
>
>
I see the problem: the pattern for a triplet is too permissive and will
incorrectly accept the error message.
> If $SHELL=/bin/csh & $CONFIG_SHELL=/bin/sh,
> $ head -4 runtest.log
> Test run by foo on Wed May 5 11:57:34 2021
> Native configuration is i386-pc-solaris2.11
>
> === runtest tests ===
>
With CONFIG_SHELL=/bin/sh, does the testsuite complete successfully?
-- Jacob
Information forwarded
to
bug-dejagnu <at> gnu.org, jcb62281 <at> gmail.com
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 03:55:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Hello,
> From: Jacob Bachmeyer <jcb62281 <at> gmail.com>
> With CONFIG_SHELL=/bin/sh, does the testsuite complete successfully?
Yes, "make -k check" returns 0 with saying as follows.
=== runtest Summary ===
# of expected passes 294
DejaGnu version 1.6.3-rc4
Expect version 5.45.4
Tcl version 8.6
Regards,
--- Kiyoshi
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 04:14:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Kiyoshi KANAZAWA wrote:
>> From: Jacob Bachmeyer <jcb62281 <at> gmail.com>
>> With CONFIG_SHELL=/bin/sh, does the testsuite complete successfully?
>>
>
> Yes, "make -k check" returns 0 with saying as follows.
This patch (from commit da5984550f2d78388bc934016b0c3461ddc8b0a4) should
fix the problem, or at least ensure that an error is produced
immediately if config.guess does not work. It will be included in
release candidate 5.
8<------
diff --git a/runtest.exp b/runtest.exp
index d950171..0e077ae 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -862,7 +862,7 @@ if {[expr {$build_triplet eq "" && $host_triplet eq ""}]} {
}
}
}
- if { ![regexp -- {^[^-]+-[^-]+-[^-]+} $build_triplet] } {
+ if { ![regexp -- {^[[:alnum:]_.]+(-[[:alnum:]_.]+)+$} $build_triplet] } {
send_error "ERROR: Running config.guess produced bogus build triplet:\n"
send_error " $build_triplet\n"
send_error " (Perhaps you need to set CONFIG_SHELL or\
8<------
Ignoring an unusable $SHELL remains a possible future addition.
-- Jacob
Information forwarded
to
bug-dejagnu <at> gnu.org, jcb62281 <at> gmail.com
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 04:48:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Yes, error is produced.
$ make -k check
:
EXPECT=expect; export EXPECT; \
if /bin/sh -c "./runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='launcher libdejagnu report-card runtest'; for tool in $l; do \
if ./runtest --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find './runtest'" 1>&2; :;\
fi; \
exit $exit_status
ERROR: Running config.guess with SHELL=/usr/bin/csh exited on code 1.
ERROR: Running config.guess produced bogus build triplet:
timestamp=2021-01-25: Command not found
Variable syntax
(Perhaps you need to set CONFIG_SHELL or SHELL in your environment
to the absolute file name of a POSIX shell?)
ERROR: Running config.guess with SHELL=/usr/bin/csh exited on code 1.
ERROR: Running config.guess produced bogus build triplet:
timestamp=2021-01-25: Command not found
Variable syntax
(Perhaps you need to set CONFIG_SHELL or SHELL in your environment
to the absolute file name of a POSIX shell?)
ERROR: Running config.guess with SHELL=/usr/bin/csh exited on code 1.
ERROR: Running config.guess produced bogus build triplet:
timestamp=2021-01-25: Command not found
Variable syntax
(Perhaps you need to set CONFIG_SHELL or SHELL in your environment
to the absolute file name of a POSIX shell?)
ERROR: Running config.guess with SHELL=/usr/bin/csh exited on code 1.
ERROR: Running config.guess produced bogus build triplet:
timestamp=2021-01-25: Command not found
Variable syntax
(Perhaps you need to set CONFIG_SHELL or SHELL in your environment
to the absolute file name of a POSIX shell?)
make[1]: *** [Makefile:1084: check-DEJAGNU] Error 1
make[1]: Leaving directory '/tmp/dejagnu-1.6.3-rc4'
make: *** [Makefile:1294: check-am] Error 2
make: Target 'check' not remade because of errors.
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#48155
; Package
dejagnu
.
(Wed, 05 May 2021 04:54:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 48155 <at> debbugs.gnu.org (full text, mbox):
Kiyoshi KANAZAWA wrote:
> Yes, error is produced.
> [...]
>
Good; I believe that the error adequately explains the problem, so I
will mark this issue as resolved. If you encounter further problems
with this, or have a better way to describe the problem in the error
message, feel free to continue to reply on this issue. If you find
other problems, please do not hesitate to report a new bug.
Thanks,
-- Jacob
Reply sent
to
jcb62281 <at> gmail.com
:
You have taken responsibility.
(Wed, 05 May 2021 05:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>
:
bug acknowledged by developer.
(Wed, 05 May 2021 05:06:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 48155-done <at> debbugs.gnu.org (full text, mbox):
Kiyoshi KANAZAWA wrote:
> Yes, error is produced.
> [...]
>
Good; I believe that the error adequately explains the problem, so I
will mark this issue as resolved. If you encounter further problems
with this, or have a better way to describe the problem in the error
message, feel free to continue to reply on this issue. If you find
other problems, please do not hesitate to report a new bug.
Thanks,
-- Jacob
[oops: previously sent to wrong address at the tracker]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 02 Jun 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.