GNU bug report logs -
#33817
dejagnu(1) fails to find commands specified with spaces and no arguments
Previous Next
Reported by: jcb62281 <at> gmail.com
Date: Fri, 21 Dec 2018 06:07:02 UTC
Severity: normal
Done: bje <at> air.net.au (Ben Elliston)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33817 in the body.
You can then email your comments to 33817 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#33817
; Package
dejagnu
.
(Fri, 21 Dec 2018 06:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jcb62281 <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-dejagnu <at> gnu.org
.
(Fri, 21 Dec 2018 06:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The supplemental patch that fixed erroneous use of "shift" in dejagnu(1)
also introduced a bug. (I knew there was a reason I had removed that
previously.) The dejagnu(1) launcher is supposed to treat "multi-word
command" as equivalent to "multi-word-command", but at present will
(incorrectly) fail to find the command if the former form is used
without other arguments. The testsuite misses this bug because (oops)
all of the command tests use verbose mode.
I already have a patch to fix this; I am writing this because I want a
bug number to put in the testcase, and I think that this list is tied
into a debbugs instance now. :-)
-- Jacob
Information forwarded
to
bug-dejagnu <at> gnu.org
:
bug#33817
; Package
dejagnu
.
(Fri, 21 Dec 2018 06:21:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 33817 <at> debbugs.gnu.org (full text, mbox):
This patch fixes the problem, without reintroducing the "shift empty
argument list" issue. This was discovered while working on
"dejagnu-report-card".
----
ChangeLog entry:
* dejagnu: Improve command parsing to fix bug #33817. Previously,
the documented equivalence between "multi word command" and
"multi-word-command" did not hold if no arguments were given.
* testsuite/launcher.all/command.exp: Add tests for bug #33817.
----
patch:
----
diff --git a/dejagnu b/dejagnu
index 06efcc7..6cd52f6 100755
--- a/dejagnu
+++ b/dejagnu
@@ -134,7 +134,6 @@ fi
# Remove any leading autoconf platform prefix and the "dejagnu" prefix.
command="$(basename "$0" | sed -e 's/^.*-\?dejagnu-\?//')"
-commext=
while expr $# \> 0 > /dev/null
do
@@ -151,15 +150,12 @@ do
for ext in ${Variants}
do
if test -f "${commdir}/${command}.$ext" ; then
- commext="$commext $ext"
+ break 2
fi
done
if expr "$1" : - > /dev/null ; then
break
fi
- if test -n "$commext" ; then
- break
- fi
if test -n "$1" ; then
command="${command}-$1"
shift
@@ -168,6 +164,14 @@ do
fi
done
+commext=
+for ext in ${Variants}
+do
+ if test -f "${commdir}/${command}.$ext" ; then
+ commext="$commext $ext"
+ fi
+done
+
if test -z "$commext" && test -n "$command" ; then
echo ERROR: could not resolve command "$command"
exit 2
diff --git a/testsuite/launcher.all/command.exp b/testsuite/launcher.all/command.exp
index eb7b219..9e21237 100644
--- a/testsuite/launcher.all/command.exp
+++ b/testsuite/launcher.all/command.exp
@@ -70,6 +70,15 @@ set tests {
"Found subcommand baz-quux with variants: gawk\n"
"Selected variant gawk" }
+ { "#" "bug #33817: ensure that the failure is 'no variant'"
+ " rather than 'could not resolve command'" }
+ { "dejagnu baz-quux is resolved but fails without GNU Awk (bug #33817)"
+ {baz-quux} {GAWK=bogus} 2
+ "ERROR: no variant of baz-quux was selected" }
+ { "dejagnu baz quux is resolved but fails without GNU Awk (bug #33817)"
+ {baz quux} {GAWK=bogus} 2
+ "ERROR: no variant of baz-quux was selected" }
+
{ "#" invalid direct calls }
{ "dejagnu -v bar fails" {-v bar} {} 2
----
-- Jacob
Reply sent
to
bje <at> air.net.au (Ben Elliston)
:
You have taken responsibility.
(Fri, 21 Dec 2018 09:10:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
jcb62281 <at> gmail.com
:
bug acknowledged by developer.
(Fri, 21 Dec 2018 09:10:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 33817-done <at> debbugs.gnu.org (full text, mbox):
Fixed in master.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Jan 2019 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.