From unknown Thu Sep 11 06:31:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#33817 <33817@debbugs.gnu.org> To: bug#33817 <33817@debbugs.gnu.org> Subject: Status: dejagnu(1) fails to find commands specified with spaces and no arguments Reply-To: bug#33817 <33817@debbugs.gnu.org> Date: Thu, 11 Sep 2025 13:31:33 +0000 retitle 33817 dejagnu(1) fails to find commands specified with spaces and n= o arguments reassign 33817 dejagnu submitter 33817 jcb62281@gmail.com severity 33817 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 21 01:06:41 2018 Received: (at submit) by debbugs.gnu.org; 21 Dec 2018 06:06:41 +0000 Received: from localhost ([127.0.0.1]:57006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaDxJ-0002xU-F1 for submit@debbugs.gnu.org; Fri, 21 Dec 2018 01:06:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaDxH-0002xE-J6 for submit@debbugs.gnu.org; Fri, 21 Dec 2018 01:06:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaDxB-0006c4-Pb for submit@debbugs.gnu.org; Fri, 21 Dec 2018 01:06:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_20, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gaDxB-0006bl-I9 for submit@debbugs.gnu.org; Fri, 21 Dec 2018 01:06:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaDxA-0007i8-Nl for bug-dejagnu@gnu.org; Fri, 21 Dec 2018 01:06:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaDx5-0006V3-Py for bug-dejagnu@gnu.org; Fri, 21 Dec 2018 01:06:32 -0500 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:40886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaDx5-0006UP-KK for bug-dejagnu@gnu.org; Fri, 21 Dec 2018 01:06:27 -0500 Received: by mail-oi1-x235.google.com with SMTP id t204so3911600oie.7 for ; Thu, 20 Dec 2018 22:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-transfer-encoding; bh=5Gau/ouT7mWkHKWOR6+C5A+C/0AF95RJNM3N7UTM4pg=; b=S7RLUrx7ADA8aX6is6Gy4BMd/LMOmwu2aSRwHoHbDVw6GCPqoiFS9Zan2NppyKhkWj VAaFRj9dDge89pNxaAcfjhJGBBSucAoM985Kp3qD2waV/wK67vJXVaQPZihbT2bCHXGJ cZfciFTh5982ZFcrnVt2uhRE3GpgAIe9r4o351t8Ys5UpXuokv3XLuB26NE+vRo2gAD1 siDNYCUm73syEK3FWomrx9tXi/k+13FoDHEKQGG8/IHhCNh43yUIfhhy/3qisuE5IakO onKWCCundoh9aUB/SXAKFQrPjI5tPc9TmSEhivaHxRphPXKEWmmuC2TwbbnzYIeCTmln GcWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-transfer-encoding; bh=5Gau/ouT7mWkHKWOR6+C5A+C/0AF95RJNM3N7UTM4pg=; b=gbQBlcGbK/U2O8nqAc6vkLTo8fyiTDBWQoyz+TEQHdkOf+fWcrF/wF/RRaOm9uYxCm npL1WxtLNez9UNkVCAujvXlBif4nPrwNCEPMvpZB6a6Nu9yVDT79uTFpLdM8FJUt/OT4 NPm9sOJAL8JIw1PQI0f9D4giuNTMvAs4ATevS2lfqrH3SXwjtgSzM1bF9ZlQpi7/ClFB BYnbESgalMB/tS07lSuS9WF7Iz9llcY+d22MM7zk/x90bFHp4j45wnOQ8qc1pf/LpPwx ddUXjSJfUxIwRfUVF4uDe+hu9KQ3yxQhIVau8bPlgIQV2Ch6APtbI1s0Or9yOlSRShNs HOyg== X-Gm-Message-State: AA+aEWaZZ0Hak/ZIlMb2tCjxrdGSpK/2U7hiw3bAseruVQ1NBb/XtxL3 oZM/9tvmgNDdtn5aJ/gBuEQv145L X-Google-Smtp-Source: AFSGD/V1Se41sijloncwR8lLwFehLd6vDTYNxTC+LiJ1QxKoOgabaeUJknqZZGmL/WpLtjmlfj6r0w== X-Received: by 2002:a05:6808:493:: with SMTP id z19mr595354oid.46.1545372386332; Thu, 20 Dec 2018 22:06:26 -0800 (PST) Received: from [192.168.2.42] (adsl-70-133-147-102.dsl.ablntx.sbcglobal.net. [70.133.147.102]) by smtp.gmail.com with ESMTPSA id l16sm11490810otr.13.2018.12.20.22.06.24 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Dec 2018 22:06:25 -0800 (PST) Message-ID: <5C1C82DF.9090206@gmail.com> Date: Fri, 21 Dec 2018 00:06:23 -0600 From: Jacob Bachmeyer 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 MIME-Version: 1.0 To: bug-dejagnu@gnu.org Subject: dejagnu(1) fails to find commands specified with spaces and no arguments Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jcb62281@gmail.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 21 01:20:30 2018 Received: (at 33817) by debbugs.gnu.org; 21 Dec 2018 06:20:30 +0000 Received: from localhost ([127.0.0.1]:57014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaEAf-0003OP-Pf for submit@debbugs.gnu.org; Fri, 21 Dec 2018 01:20:29 -0500 Received: from mail-oi1-f169.google.com ([209.85.167.169]:40943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaEAe-0003OD-Ag for 33817@debbugs.gnu.org; Fri, 21 Dec 2018 01:20:28 -0500 Received: by mail-oi1-f169.google.com with SMTP id t204so3931624oie.7 for <33817@debbugs.gnu.org>; Thu, 20 Dec 2018 22:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-transfer-encoding; bh=JZAdJ9Ut1rVmRxz3EkkC5fEtM9DaT1d71/vztOK9vWs=; b=i4ms+bH0eX0HSY6L5mSyV/ffIi8Yv5OrcypYMHDfWquInLl96D/Iu4nkKZAYYInSZi f7rSMA6VOI6UoouHsyrA9WkugafPZVCNBu+7YDd3uBZre9Few8x5phI8VdObXjmO/B/4 yd7FTyyBzJjqbwD30qz8Vm3Vkwx4q/YDg+fDgR8t0zZKbkuO1yuoQzIZv8V4JroacUB0 mS8/hvmrabP1lNKJLTGPrFOKcnM7UClp3jG18b2/A+6JouEvMshxotZR5hEylGEgUFL+ 8aR6QGKiYW7LtKC4yFT/0vHIEVfyrOFezzubUrpzTkGiM8JaOD+aCzlAudbxqOc+nDMP HknQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-transfer-encoding; bh=JZAdJ9Ut1rVmRxz3EkkC5fEtM9DaT1d71/vztOK9vWs=; b=rUBKVmQrl93JTcu5pyUXYBOvrrJunWg4Ve2BMzEWIvmz++V1qJkikJQr9SVyeZbflu Q8Cwd75BNFWkd55jkAjbrzXveeQ3B2cKJPDC/2Rk2tqW28VuxS0q0Umw4VUWriEUWgI1 Ju0EZSvngYZ9JQ0//uwA76BcU4e2A1I4Ua39idlaWTixSa/kcIC0f3ueTfagrvdMSVdA SalGV3DRBdzacVt9t+SvluvBnevHSOfMi9rqAgDokoL3yD67/ZUj7HsPzMt9bYGTgbs9 5GCuJxgUK2h+jZhtM0Dw865MoFehQh8UE481iouKmlG5mzY7MlXPkdK2qsYQc1nVN5q9 kxQA== X-Gm-Message-State: AA+aEWYuyYerQ34ptQ89RhPReBf8uZVqu+Ghd31FRQYSeTg2n7AqMaId RHsnM1eL6Cx0vqz82rrmH2kEQweB X-Google-Smtp-Source: AFSGD/U+SGZGQOWu78DVC42QNP2yYvIvmW8rIXubLni0yqKoTOtL1gD6Xb2QDhniOMaj7hmZWZBaug== X-Received: by 2002:a05:6808:13:: with SMTP id u19mr604481oic.57.1545373222231; Thu, 20 Dec 2018 22:20:22 -0800 (PST) Received: from [192.168.2.42] (adsl-70-133-147-102.dsl.ablntx.sbcglobal.net. [70.133.147.102]) by smtp.gmail.com with ESMTPSA id d3sm11497417otb.79.2018.12.20.22.20.20 for <33817@debbugs.gnu.org> (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Dec 2018 22:20:21 -0800 (PST) Message-ID: <5C1C8623.6090208@gmail.com> Date: Fri, 21 Dec 2018 00:20:19 -0600 From: Jacob Bachmeyer 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 MIME-Version: 1.0 To: 33817@debbugs.gnu.org Subject: PATCH: fix bug #33817 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 33817 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jcb62281@gmail.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 21 04:09:08 2018 Received: (at 33817-done) by debbugs.gnu.org; 21 Dec 2018 09:09:08 +0000 Received: from localhost ([127.0.0.1]:57079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaGnr-0007ce-NC for submit@debbugs.gnu.org; Fri, 21 Dec 2018 04:09:07 -0500 Received: from mailhub.air.net.au ([121.127.198.92]:38506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaGnl-0007c3-9p for 33817-done@debbugs.gnu.org; Fri, 21 Dec 2018 04:09:03 -0500 Received: by mailhub.air.net.au (Postfix, from userid 500) id 129141200A1; Fri, 21 Dec 2018 20:08:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=air.net.au; s=mail; t=1545383334; bh=rIqqaWk+VzgzdTY5pme+mu4cx2jQCgqknvOO2ySSgXE=; h=To:Subject:Date:From:From; b=7zjKvu3yjm7VLwO0cNn+j7QPmcEv/k9n0Q7jcS4miS7ED5SYGT1UG966jTQwmTGoJ xHuSsAdJ0MTT00G6Bugv++QGLvBdz4VXkFMaA1iy7r1nA3Dg/ilaGZcr0ZI2lpVr9u hd4pveuDhSHYr5eBWjoqEAHlMZ7rI8dIbIkstomA= To: 33817-done@debbugs.gnu.org Subject: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <20181221090854.129141200A1@mailhub.air.net.au> Date: Fri, 21 Dec 2018 20:08:54 +1100 (AEDT) From: bje@air.net.au (Ben Elliston) X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Fixed in master. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: 33817-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Fixed in master. From unknown Thu Sep 11 06:31:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Jan 2019 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator