GNU bug report logs - #41918
[PATCH] Propagate error value of auto-loaded command

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: dejagnu; Reported by: Tom de Vries <tdevries@HIDDEN>; Owned by: jcb62281@HIDDEN; Keywords: patch; dated Wed, 17 Jun 2020 12:35:02 UTC; Maintainer for dejagnu is bug-dejagnu@HIDDEN.
Owner recorded as jcb62281@HIDDEN Request was from Jacob Bachmeyer <jcb62281@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 30 Jun 2020 23:55:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 30 19:55:03 2020
Received: from localhost ([127.0.0.1]:51967 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jqQ5f-0002GS-4T
	for submit <at> debbugs.gnu.org; Tue, 30 Jun 2020 19:55:03 -0400
Received: from mail-oi1-f178.google.com ([209.85.167.178]:39221)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jcb62281@HIDDEN>)
 id 1jqQ5b-0002Fn-MX; Tue, 30 Jun 2020 19:55:01 -0400
Received: by mail-oi1-f178.google.com with SMTP id w17so18295719oie.6;
 Tue, 30 Jun 2020 16:54:59 -0700 (PDT)
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=Foap12gIr59wZDDUy/+lYT5U6f+kcCCrw5YdW40ing0=;
 b=JvDJEYBCuS8d/k+VV72T5taLdSlJOHphYQoUsZO+IICajvBn0JCeHJVv97iCNpVWdg
 t+y5ZzcKiuMe15jSk1R5v08RtIEgNjSn8AoP7buVHnlr9pBCHwHc86QUoxXECuttoSTK
 IFLUacJlajq4U/3K0PLORUXwTPJGIOwSKYUSjERBzAtQz6cZsRzMpSF/Rw33CKQTa5lZ
 g+RHpJ/p9Y03fQrsUHbDq4oQ5HbS3hwMq+4JA1+fprruDSN1G+82eQf2oWY+tbNa/IYl
 SPCCFoMy+lM95A0IBTOcKid6JgtXKH+7+eOgq2n3ceAusCphEJoubJYPJA7zoA+1KpnB
 ETWg==
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=Foap12gIr59wZDDUy/+lYT5U6f+kcCCrw5YdW40ing0=;
 b=n9Vu0ziYLTnTYxJHTS6C/ftzDhM17ptCPJSMyEhJTfUG8nsgEDXBxdgxSzpG+YzG/l
 Y/RvWinVIfgGTCpUylpka49L3Qj+3sfczu4++sV3CzuESGzHSxVVY4ELgT91Rej3ggkY
 6d3LJYcv/LdvsOwo4QlHo9y8p5TprOUPewtOpWi+5Nb3POiZiJRSh51bwpuDF51O+q2C
 SRIkSDraQQnfNeNhUYxvf5EKydoJ+9x/qfRYX/IC4L+7TNo3+tD4HWsGMICoxFEpht7i
 5DC2u3DHKQCysuq+0+Mhx7j7A9wb8m71YioKat1vDUiqjZJiQMQinal8y84A3btfDbYd
 ozxw==
X-Gm-Message-State: AOAM530s6a4v70POQw7JD1DhuHfVUGq9O4iHkiomPVwlErCOjsDFMF1a
 adAa240BBUTDGmPSR7krxPxhApA3
X-Google-Smtp-Source: ABdhPJz/zONAUrVBNjVE6/81B5I7VVv2O9isrTLz2RZEkILmt023LK5oU5eDTa8735VXCkOo9Q8/jw==
X-Received: by 2002:aca:8cd:: with SMTP id 196mr17675099oii.148.1593561293812; 
 Tue, 30 Jun 2020 16:54:53 -0700 (PDT)
Received: from [192.168.2.42] (adsl-70-133-144-251.dsl.ablntx.sbcglobal.net.
 [70.133.144.251])
 by smtp.gmail.com with ESMTPSA id y5sm1098239otq.75.2020.06.30.16.54.52
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Tue, 30 Jun 2020 16:54:53 -0700 (PDT)
Message-ID: <5EFBD0CB.7090605@HIDDEN>
Date: Tue, 30 Jun 2020 18:54:51 -0500
From: Jacob Bachmeyer <jcb62281@HIDDEN>
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: 41824 <at> debbugs.gnu.org, 41918 <at> debbugs.gnu.org
Subject: Branch PR41918 containing fixes for these issues is into final testing
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41918
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jcb62281@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

The temporary branch PR41918 (which earlier absorbed the PR41824 
temporary branch) is now merged onto the testing queue ahead of master.  
After these patches pass full testing, master will be fast-forwarded to 
include them.

-- Jacob




Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 20 Jun 2020 00:32:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 19 20:32:24 2020
Received: from localhost ([127.0.0.1]:57043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jmRQl-0003iZ-N3
	for submit <at> debbugs.gnu.org; Fri, 19 Jun 2020 20:32:24 -0400
Received: from mail-oi1-f175.google.com ([209.85.167.175]:41591)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jcb62281@HIDDEN>) id 1jmRQh-0003iK-VJ
 for 41918 <at> debbugs.gnu.org; Fri, 19 Jun 2020 20:32:22 -0400
Received: by mail-oi1-f175.google.com with SMTP id a21so10027414oic.8
 for <41918 <at> debbugs.gnu.org>; Fri, 19 Jun 2020 17:32:19 -0700 (PDT)
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:cc:subject
 :references:in-reply-to:content-transfer-encoding;
 bh=sS5kPxX0k8NSiC6syQZuW8uY8a6aLp6/MwmdGE9K9fs=;
 b=DDzOz3wuYYJOXa8tf0Q2utswVnipJqo8otk723P1u6+JjQp72NRmNvuXv7fneimclu
 DY/cSZBLfRbyzTCo2bIBfw4wgYDlEp8lP1mT+xARF0vTMd2+XIkgL6gPfDea2fPKCDlO
 Cg0MmGp2NPzxdOx2GD7FSwCNljmSS73OykqjcwDSRDIKK2zwrdYZmnVpj+EKbLxmo43L
 B6XyD5PQDyluP7AtbmrQqMTPOf6QrcvB8pQfk8gMtgNuGMwoRdNKyJZ+dd1RTBhVzg/F
 eXelvqLbP5DtieGCZxQwJtWj4L2qTNBN4DHYqKElQhtUd0ady1/dmFJh1lC1EhnFas78
 eZGA==
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:cc:subject:references:in-reply-to
 :content-transfer-encoding;
 bh=sS5kPxX0k8NSiC6syQZuW8uY8a6aLp6/MwmdGE9K9fs=;
 b=f4Yie5TkLlrEa7f8DUDRdVJ3Tdu3GXJYaMkn58vSof1p1qi3s3Nbti3YNYDmbQyqEX
 F2iGfJfIYQSSfp5zX/Xk2HTEs7DdAOHoBuhkMzQLg4vfGamcC6hoOniPfflZOS26BjEI
 dk7lv3Oan6mMFwWS5QYOgt2zxkvttStVhU+UEcSVfLJI7l5XJNLhY7fOA1l7MkOrvUJL
 pWtKcsCCKIEx/POxXTpt8j9xkwleSsKtRgypHzKkLIcivllrLmNsLOpBzAOIeTOEbynQ
 TIWP2veWKd/+aeNLTlw0WBksEfhpa/hK79Vv5Vqg34zYZtDVcj3j5T3FERVgoH+0DF+l
 a3zg==
X-Gm-Message-State: AOAM533H6SoSaIyfPawsEWYcU/RBuipkKEZ4KKINSS3YP0IrtxYSqHb1
 qXKn/IJkSgMeMR5mwRn7t8M=
X-Google-Smtp-Source: ABdhPJyytdDQHHI5dlklqGRbPSDGq+OY7awshq6aAIAPoyIbORij/osQ1ZT6xuEdidKHkj30RyY9Zg==
X-Received: by 2002:aca:804:: with SMTP id 4mr2522773oii.105.1592613134298;
 Fri, 19 Jun 2020 17:32:14 -0700 (PDT)
Received: from [192.168.2.42] (adsl-70-133-145-204.dsl.ablntx.sbcglobal.net.
 [70.133.145.204])
 by smtp.gmail.com with ESMTPSA id n60sm1684362otn.75.2020.06.19.17.32.13
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 19 Jun 2020 17:32:13 -0700 (PDT)
Message-ID: <5EED590C.2090706@HIDDEN>
Date: Fri, 19 Jun 2020 19:32:12 -0500
From: Jacob Bachmeyer <jcb62281@HIDDEN>
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: Tom de Vries <tdevries@HIDDEN>
Subject: Re: bug#41918: [PATCH] Propagate error value of auto-loaded command
References: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
 <5EEAA504.40803@HIDDEN> <22f1f9b6-1335-6280-ff0a-f824ad2dc230@HIDDEN>
 <5EEC0012.1030807@HIDDEN> <341960ed-443a-94cd-760b-b8c97cee9be4@HIDDEN>
In-Reply-To: <341960ed-443a-94cd-760b-b8c97cee9be4@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41918
Cc: 41918 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jcb62281@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Tom de Vries wrote:
> On 6/19/20 2:00 AM, Jacob Bachmeyer wrote:
>   
>> Tom de Vries wrote:
>>     
>>> On 6/18/20 1:19 AM, Jacob Bachmeyer wrote:
>>>  
>>>       
>>>> Tom de Vries wrote:
>>>>    
>>>>         
>>>>> Hi,
>>>>>
>>>>> I think I found a bug in proc unknown in lib/framework.exp.
>>>>>
>>>>> Patch describing the problem and fixing it attached below.
>>>>>         
>>>>>           
>>>> I found a similar issue while patching bug #41824; please check whether
>>>> that patch addresses this issue adequately.
>>>>     
>>>>         
>>> AFAICT, it does not.  Dejagnu test-case attached.
>>>   
>>>       
>> That test is incorrect:  it does not specify the --keep_going option,
>> but expects runtest to continue after a test script aborts with a Tcl
>> error.
>>     
>
> Well, yes, it's respecting the difference in handling of proc-not-found
> vs other tcl errors that is present in current dejagnu.
>
> Since:
> - your implementation of --keep_going did not modify this, and
> - your description of keep-going in NEWS explictly respected that
>   difference,
> I had no reason to deviate from that.
>
> Now that you've decided to change the handling of proc-not-found vs
> other tcl errors in patch 0005, obviously the test-case needs to be
> updated to accomodate for that.
>
>   

That handling was actually very inconsistent:  an error in a regular 
testcase aborts the script, but testing (almost) silently continued, but 
an error if auto-loading had been used aborted the entire test run.  
That difference in handling proc-not-found and other Tcl errors was a 
long-standing bug in DejaGnu.  Any Tcl error means that the results are 
not really valid, so almost silently continuing is wrong and was wrong.

>> I have also attached another patch (0005) that fixes an inconsistency in
>> DejaGnu's handling of Tcl errors in test scripts.  Previously, DejaGnu
>> would abort the test run if an undefined procedure is called, but would
>> only issue an ERROR message and continue with the next test script for
>> all other Tcl errors.  This patch solves that by ensuring that DejaGnu
>> will abort on any uncaught Tcl error in a test script unless the
>> --keep_going option is given on the command line.  An UNRESOLVED result
>> appears in the log in any case if a test script aborts due to an error.
>>
>>     
>
> I couldn't apply this cleanly, so instead I'm now looking at branch PR41918.
>   

Odd, but that is why I pushed that branch.

> I see that for abort-undef.exp we have:
> ...
> ERROR: (DejaGnu) proc "bogus_command 1 2 3 4" does not exist.
> The error code is TCL LOOKUP COMMAND bogus_command
> The info on the error is:
> invalid command name "bogus_command"
>     while executing
> "::tcl_unknown bogus_command 1 2 3 4"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel 1 ::tcl_unknown $args"
> ERROR: tcl error sourcing
> /home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp.
> ERROR: tcl error code TCL LOOKUP COMMAND bogus_command
> ERROR: invalid command name "bogus_command"
>     while executing
> "bogus_command 1 2 3 4"
>     (file
> "/home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
> line 23)
>     invoked from within
> "source
> /home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 source
> /home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
>     invoked from within
> "catch "uplevel #0 source $test_file_name""
> ...
>
> Should we error twice on this? FWIW, just removing ::unknown seems to be
> the easiest way to fix that.
>   

I have since realized that DejaGnu's ::unknown seems to be about useless 
other than producing that first error.  I am thinking about removing it 
entirely now that runtest aborts after catching a Tcl error from a test 
script.

> Anyway, I have two patches attached:
> - one that rewords the NEWS entries into something more intuitive for me
>   
Agreed; the NEWS entries were written separately and the later change 
did make the first one wrong.  Thanks.

> - one that adds a test-case abort-dbz.exp, a copy of
>   abort-al-dbz.exp, but without the auto-load bit.
>   
Agreed; that was a missing case in the testsuite.  Thanks.



-- Jacob




Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 19 Jun 2020 12:37:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 19 08:37:07 2020
Received: from localhost ([127.0.0.1]:55381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jmGGZ-00056i-7s
	for submit <at> debbugs.gnu.org; Fri, 19 Jun 2020 08:37:07 -0400
Received: from mx2.suse.de ([195.135.220.15]:49330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tdevries@HIDDEN>) id 1jmGGX-00056E-3A
 for 41918 <at> debbugs.gnu.org; Fri, 19 Jun 2020 08:37:05 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay2.suse.de (unknown [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id E77FEB134;
 Fri, 19 Jun 2020 12:36:58 +0000 (UTC)
Subject: Re: bug#41918: [PATCH] Propagate error value of auto-loaded command
To: jcb62281@HIDDEN
References: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
 <5EEAA504.40803@HIDDEN> <22f1f9b6-1335-6280-ff0a-f824ad2dc230@HIDDEN>
 <5EEC0012.1030807@HIDDEN>
From: Tom de Vries <tdevries@HIDDEN>
Autocrypt: addr=tdevries@HIDDEN; keydata=
 xsBNBF0ltCcBCADDhsUnMMdEXiHFfqJdXeRvgqSEUxLCy/pHek88ALuFnPTICTwkf4g7uSR7
 HvOFUoUyu8oP5mNb4VZHy3Xy8KRZGaQuaOHNhZAT1xaVo6kxjswUi3vYgGJhFMiLuIHdApoc
 u5f7UbV+egYVxmkvVLSqsVD4pUgHeSoAcIlm3blZ1sDKviJCwaHxDQkVmSsGXImaAU+ViJ5l
 CwkvyiiIifWD2SoOuFexZyZ7RUddLosgsO0npVUYbl6dEMq2a5ijGF6/rBs1m3nAoIgpXk6P
 TCKlSWVW6OCneTaKM5C387972qREtiArTakRQIpvDJuiR2soGfdeJ6igGA1FZjU+IsM5ABEB
 AAHNH1RvbSBkZSBWcmllcyA8dGRldnJpZXNAc3VzZS5kZT7CwKsEEwEIAD4WIQSsnSe5hKbL
 MK1mGmjuhV2rbOJEoAUCXSW0JwIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAh
 CRDuhV2rbOJEoBYhBKydJ7mEpsswrWYaaO6FXats4kSgc48H/Ra2lq5p3dHsrlQLqM7N68Fo
 eRDf3PMevXyMlrCYDGLVncQwMw3O/AkousktXKQ42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dP8OUY6SC94x1G81A9/xbtm9LQxKm0EiDH8KBMLfQ==
Message-ID: <341960ed-443a-94cd-760b-b8c97cee9be4@HIDDEN>
Date: Fri, 19 Jun 2020 14:36:58 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.9.0
MIME-Version: 1.0
In-Reply-To: <5EEC0012.1030807@HIDDEN>
Content-Type: multipart/mixed; boundary="------------47CB9B5D30006E5707548C52"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41918
Cc: 41918 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------47CB9B5D30006E5707548C52
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

On 6/19/20 2:00 AM, Jacob Bachmeyer wrote:
> Tom de Vries wrote:
>> On 6/18/20 1:19 AM, Jacob Bachmeyer wrote:
>>  
>>> Tom de Vries wrote:
>>>    
>>>> Hi,
>>>>
>>>> I think I found a bug in proc unknown in lib/framework.exp.
>>>>
>>>> Patch describing the problem and fixing it attached below.
>>>>         
>>> I found a similar issue while patching bug #41824; please check whether
>>> that patch addresses this issue adequately.
>>>     
>>
>> AFAICT, it does not.  Dejagnu test-case attached.
>>   
> 
> That test is incorrect:  it does not specify the --keep_going option,
> but expects runtest to continue after a test script aborts with a Tcl
> error.

Well, yes, it's respecting the difference in handling of proc-not-found
vs other tcl errors that is present in current dejagnu.

Since:
- your implementation of --keep_going did not modify this, and
- your description of keep-going in NEWS explictly respected that
  difference,
I had no reason to deviate from that.

Now that you've decided to change the handling of proc-not-found vs
other tcl errors in patch 0005, obviously the test-case needs to be
updated to accomodate for that.

> I have attached a fixed patch (0004) that avoids modifying the source
> tree by setting up autoloading in the build tree.
> 

Ack, thanks.

> I have also attached another patch (0005) that fixes an inconsistency in
> DejaGnu's handling of Tcl errors in test scripts.  Previously, DejaGnu
> would abort the test run if an undefined procedure is called, but would
> only issue an ERROR message and continue with the next test script for
> all other Tcl errors.  This patch solves that by ensuring that DejaGnu
> will abort on any uncaught Tcl error in a test script unless the
> --keep_going option is given on the command line.  An UNRESOLVED result
> appears in the log in any case if a test script aborts due to an error.
> 

I couldn't apply this cleanly, so instead I'm now looking at branch PR41918.

I see that for abort-undef.exp we have:
...
ERROR: (DejaGnu) proc "bogus_command 1 2 3 4" does not exist.
The error code is TCL LOOKUP COMMAND bogus_command
The info on the error is:
invalid command name "bogus_command"
    while executing
"::tcl_unknown bogus_command 1 2 3 4"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 ::tcl_unknown $args"
ERROR: tcl error sourcing
/home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp.
ERROR: tcl error code TCL LOOKUP COMMAND bogus_command
ERROR: invalid command name "bogus_command"
    while executing
"bogus_command 1 2 3 4"
    (file
"/home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
line 23)
    invoked from within
"source
/home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source
/home/vries/dejagnu/devel/src/testsuite/runtest.main/abort/testsuite/abort.test/abort-undef.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""
...

Should we error twice on this? FWIW, just removing ::unknown seems to be
the easiest way to fix that.

Anyway, I have two patches attached:
- one that rewords the NEWS entries into something more intuitive for me
- one that adds a test-case abort-dbz.exp, a copy of
  abort-al-dbz.exp, but without the auto-load bit.

Thanks,
- Tom




--------------47CB9B5D30006E5707548C52
Content-Type: text/x-patch; charset=UTF-8;
 name="0007-Reword-NEWS-entries.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0007-Reword-NEWS-entries.patch"

Reword NEWS entries

---
 NEWS | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 619f0ff..abae60b 100644
--- a/NEWS
+++ b/NEWS
@@ -7,11 +7,10 @@ Changes since 1.6.2:
    should use this proc. The 'is_remote' proc is deprecated.
 2. runtest now accepts --local_init and --global_init options to override
    the default of reading "site.exp".  See the manual for details.
+X. runtest now aborts if a test script fails with any Tcl error.  Previously,
+   only calling an undefined procedure would cause the test run to abort.
 X. runtest now accepts a --keep_going option to continue with other test
-   scripts after a test script invokes an undefined command.
-X. Unless the --keep_going option is used, runtest now aborts if a test
-   script fails with any Tcl error.  Previously, only calling an undefined
-   procedure would cause the test run to abort.
+   scripts after a test script fails with a Tcl error.
 3. A utility procedure relative_filename has been added.  This procedure
    computes a relative file name to a given destination from a given base.
 4. The utility procedure 'grep' now accepts a '-n' option that

--------------47CB9B5D30006E5707548C52
Content-Type: text/x-patch; charset=UTF-8;
 name="0008-Add-abort.test-abort-dbz.exp.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0008-Add-abort.test-abort-dbz.exp.patch"

Add abort.test/abort-dbz.exp

---
 testsuite/runtest.main/abort.exp                   | 11 ++++++++
 .../abort/testsuite/abort.test/abort-dbz.exp       | 29 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/testsuite/runtest.main/abort.exp b/testsuite/runtest.main/abort.exp
index b352b56..59a934c 100644
--- a/testsuite/runtest.main/abort.exp
+++ b/testsuite/runtest.main/abort.exp
@@ -50,6 +50,17 @@ set tests {
 	"PASS: running abort-undef.exp.*\
 	*UNRESOLVED: .* aborted.*\
 	*expected passes\[ \t\]+1\n.*unresolved testcases\[ \t\]+1\n" }
+    { "stop at divide-by-zero without --keep_going"
+	"abort-dbz.exp simple.exp"
+	"PASS: running abort-dbz.exp.*\
+	*UNRESOLVED: .* aborted.*\
+	*expected passes\[ \t\]+1\n.*unresolved testcases\[ \t\]+1\n" }
+    { "continue after divide-by-zero with --keep_going"
+	"--keep_going abort-dbz.exp simple.exp"
+	"PASS: running abort-dbz.exp.*\
+	*UNRESOLVED: .* aborted.*\
+	*PASS: simple test.*\
+	*expected passes\[ \t\]+2\n" }
     { "stop at auto-loaded divide-by-zero without --keep_going"
 	"abort-al-dbz.exp simple.exp"
 	"PASS: running abort-al-dbz.exp.*\
diff --git a/testsuite/runtest.main/abort/testsuite/abort.test/abort-dbz.exp b/testsuite/runtest.main/abort/testsuite/abort.test/abort-dbz.exp
new file mode 100644
index 0000000..711347d
--- /dev/null
+++ b/testsuite/runtest.main/abort/testsuite/abort.test/abort-dbz.exp
@@ -0,0 +1,29 @@
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Cause a divide-by-zero error.
+
+pass "running abort-dbz.exp"
+
+proc throw_arith_error_div_by_zero { } {
+    expr { 1 / 0 }
+}
+
+throw_arith_error_div_by_zero
+
+fail "script did not abort"

--------------47CB9B5D30006E5707548C52--




Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 19 Jun 2020 00:00:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 18 20:00:30 2020
Received: from localhost ([127.0.0.1]:54684 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jm4SL-0007Iy-Nn
	for submit <at> debbugs.gnu.org; Thu, 18 Jun 2020 20:00:30 -0400
Received: from mail-oi1-f195.google.com ([209.85.167.195]:37310)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jcb62281@HIDDEN>) id 1jm4SJ-0007Ih-0x
 for 41918 <at> debbugs.gnu.org; Thu, 18 Jun 2020 20:00:27 -0400
Received: by mail-oi1-f195.google.com with SMTP id a3so6845155oid.4
 for <41918 <at> debbugs.gnu.org>; Thu, 18 Jun 2020 17:00:26 -0700 (PDT)
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:cc:subject
 :references:in-reply-to;
 bh=r6KWiUJP9HLIfLNCs1GSEuXy1HlWTxgJjyJ8NK1HdHU=;
 b=oxRjm5bYtkGll5rMoBcr9LcvXd0TVsuenhrroap2Fx/aF+m7cUGxdU7+hW8TIjYVU6
 j1XZqANszFu6+qDOM56f0Y1ORDDK2wcHrjk7ataWJ+323P4xWKSkN5G+AnOm76jfcrX/
 BCVqVtNntIMDWrQYCVYqlV1sI3BS2VAVBbH9F74MwC5HT2azBbZwXU4MmP+LllU0vlNn
 Uxd50JMWCW78g79YVeTUK4+DzkuCg/ZcUcnVuCLPsPB+ku99qRqV3eUzul9otpLxw8mQ
 7i8svPtRgp5rBI2PPc5onRPMRW76SIWDIvufFRW/wOd1NN3k54bhYssZvcoNw6vIUYGk
 9bfQ==
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:cc:subject:references:in-reply-to;
 bh=r6KWiUJP9HLIfLNCs1GSEuXy1HlWTxgJjyJ8NK1HdHU=;
 b=iEqkmuHrmggMlvDP4FHXjbzMOySzhCEA+hk9yvinf2+qA50aNuZ86Sk8bSs38dr1c/
 PfCN1yr38G0DhKDGI/4QLWyMhXK2n4MKDjjS3ouB+sO+uWcU5MQizn8cx+jV+FTVDcao
 3teEHBHztCLPCYRxxr4gkLtix726jht0mGQ2m+kGYgOqlRqryMFolxPROQF0s/SSftti
 5sevHG0HQhd8myr2SAsYOSYwoAMavhzpTNJ1WrZA5AUK1duheD8B/v85JmN50LmfIV5+
 PCB8AJT7EaxL+R0PIsOmcogqG/2QkAQFWLjc4u69mGKU1W14hSUfclXY/Hoe3BiHC1D9
 JTtw==
X-Gm-Message-State: AOAM533rTdDQIm18zCJPha6bV7HoAXxyIi5/QthvbiYPfEaYc1EYk59i
 inNITcOLd27j1wgNibtWTxs=
X-Google-Smtp-Source: ABdhPJyc2nTZbUYQ/69vzx5NU6gD1Vx1pyttAtGuIlgtLCmWy5OMh9sO2AfhclABwJWa/f8ErSQhoA==
X-Received: by 2002:aca:5dd5:: with SMTP id r204mr1228402oib.80.1592524821361; 
 Thu, 18 Jun 2020 17:00:21 -0700 (PDT)
Received: from [192.168.2.42] (adsl-70-133-145-204.dsl.ablntx.sbcglobal.net.
 [70.133.145.204])
 by smtp.gmail.com with ESMTPSA id p9sm1058934ota.24.2020.06.18.17.00.19
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Thu, 18 Jun 2020 17:00:20 -0700 (PDT)
Message-ID: <5EEC0012.1030807@HIDDEN>
Date: Thu, 18 Jun 2020 19:00:18 -0500
From: Jacob Bachmeyer <jcb62281@HIDDEN>
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: Tom de Vries <tdevries@HIDDEN>
Subject: Re: bug#41918: [PATCH] Propagate error value of auto-loaded command
References: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
 <5EEAA504.40803@HIDDEN> <22f1f9b6-1335-6280-ff0a-f824ad2dc230@HIDDEN>
In-Reply-To: <22f1f9b6-1335-6280-ff0a-f824ad2dc230@HIDDEN>
Content-Type: multipart/mixed; boundary="------------040508040308010408000506"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41918
Cc: 41918 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jcb62281@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

This is a multi-part message in MIME format.
--------------040508040308010408000506
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Tom de Vries wrote:
> On 6/18/20 1:19 AM, Jacob Bachmeyer wrote:
>   
>> Tom de Vries wrote:
>>     
>>> Hi,
>>>
>>> I think I found a bug in proc unknown in lib/framework.exp.
>>>
>>> Patch describing the problem and fixing it attached below.
>>>   
>>>       
>> I found a similar issue while patching bug #41824; please check whether
>> that patch addresses this issue adequately.
>>     
>
> AFAICT, it does not.  Dejagnu test-case attached.
>   

That test is incorrect:  it does not specify the --keep_going option, 
but expects runtest to continue after a test script aborts with a Tcl error.
I have attached a fixed patch (0004) that avoids modifying the source 
tree by setting up autoloading in the build tree.

I have also attached another patch (0005) that fixes an inconsistency in 
DejaGnu's handling of Tcl errors in test scripts.  Previously, DejaGnu 
would abort the test run if an undefined procedure is called, but would 
only issue an ERROR message and continue with the next test script for 
all other Tcl errors.  This patch solves that by ensuring that DejaGnu 
will abort on any uncaught Tcl error in a test script unless the 
--keep_going option is given on the command line.  An UNRESOLVED result 
appears in the log in any case if a test script aborts due to an error.

Note that --keep_going is *not* expected to be normally used.  The 
--keep_going option "papers over" serious errors in the testsuite, and a 
testsuite that produces Tcl errors is broken, period.  This is the 
reason that there is no supported means for a testsuite to set --keep_going.


-- Jacob

--------------040508040308010408000506
Content-Type: text/plain;
 name="0004-Add-tests-for-handling-arithmetic-errors-in-auto-loa.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename*0="0004-Add-tests-for-handling-arithmetic-errors-in-auto-loa.pa";
 filename*1="tch"

RnJvbSBjYmJhNGRiYjhkNTJjNWIwZjMyZTgwM2NmODU4N2YyNzZlZTFlYzg2IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKYWNvYiBCYWNobWV5ZXIgPGpjYjYyMjgxK2RldkBn
bWFpbC5jb20+CkRhdGU6IFRodSwgMTggSnVuIDIwMjAgMTc6MzI6NDggLTA1MDAKU3ViamVj
dDogW1BBVENIIDQvNV0gQWRkIHRlc3RzIGZvciBoYW5kbGluZyBh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jIElu
Yy4sIDUxIEZyYW5rbGluIFN0cmVldCAtIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEw
LTEzMDEsIFVTQS4KKworIyBDYXVzZSBhIGRpdmlkZS1ieS16ZXJvIGVycm9yIGluIGFuIGF1
dG8tbG9hZGVkIHByb2NlZHVyZS4KKworcGFzcyAicnVubmluZyBhYm9ydC1hbC1kYnouZXhw
IgorCitzZXQgZmQgW29wZW4gW3Rlc3RzdWl0ZSBmaWxlIC1vYmplY3QgLXRlc3QgbGliIGZv
by50Y2xdIHddCitwdXRzICRmZCB7cHJvYyB0aHJvd19hcml0aF9lcnJvcl9kaXZfYnlfemVy
byB7IH0geworICAgIGV4cHIgeyAxIC8gMCB9Cit9Cit9CitjbG9zZSAkZmQKKworYXV0b19t
a2luZGV4IFwKKyAgICBbdGVzdHN1aXRlIGZpbGUgLW9iamVjdCAtdGVzdCBsaWJdIFwKKyAg
ICBbdGVzdHN1aXRlIGZpbGUgLW9iamVjdCAtdGVzdCBsaWIvKi50Y2xdCisKK2xhcHBlbmQg
YXV0b19wYXRoIFt0ZXN0c3VpdGUgZmlsZSAtb2JqZWN0IC10ZXN0IGxpYl0KKwordGhyb3df
YXJpdGhfZXJyb3JfZGl2X2J5X3plcm8KKworZmFpbCAic2NyaXB0IGRpZCBub3QgYWJvcnQi
Ci0tIAoxLjcuNC4xCgo=
--------------040508040308010408000506
Content-Type: text/plain;
 name="0005-Use-consistent-behavior-for-Tcl-errors-in-test-scrip.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename*0="0005-Use-consistent-behavior-for-Tcl-errors-in-test-scrip.pa";
 filename*1="tch"

RnJvbSBkNDUzMTBjZDI1N2QzOTliODIwOGZhOTkwN2Y3YzlmMmY0YWM3ZWRhIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKYWNvYiBCYWNobWV5ZXIgPGpjYjYyMjgxK2RldkBn
bWFpbC5jb20+CkRhdGU6IFRodSw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
YXQgY2FsbCB0byB1bmtub3duIGNvbW1hbmQuKlwKKwkqVU5SRVNPTFZFRDogLiogYWJvcnRl
ZC4qXAogCSpleHBlY3RlZCBwYXNzZXNcWyBcdFxdKzFcbi4qdW5yZXNvbHZlZCB0ZXN0Y2Fz
ZXNcWyBcdFxdKzFcbiIgfQogICAgIHsgImNvbnRpbnVlIGFmdGVyIGFib3J0IHdpdGggLS1r
ZWVwX2dvaW5nIgogCSItLWtlZXBfZ29pbmcgYWJvcnQtdW5kZWYuZXhwIHNpbXBsZS5leHAi
CiAJIlBBU1M6IHJ1bm5pbmcgYWJvcnQtdW5kZWYuZXhwLipcCi0JKlVOUkVTT0xWRUQ6IC4q
IGFib3J0ZWQgYXQgY2FsbCB0byB1bmtub3duIGNvbW1hbmQuKlwKKwkqVU5SRVNPTFZFRDog
LiogYWJvcnRlZC4qXAogCSpQQVNTOiBzaW1wbGUgdGVzdC4qXAogCSpleHBlY3RlZCBwYXNz
ZXNcWyBcdFxdKzJcbi4qdW5yZXNvbHZlZCB0ZXN0Y2FzZXNcWyBcdFxdKzFcbiIgfQogfQot
LSAKMS43LjQuMQoK
--------------040508040308010408000506--




Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 18 Jun 2020 07:00:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 18 03:00:12 2020
Received: from localhost ([127.0.0.1]:52671 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jloWy-0004Ol-8q
	for submit <at> debbugs.gnu.org; Thu, 18 Jun 2020 03:00:12 -0400
Received: from mx2.suse.de ([195.135.220.15]:35580)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tdevries@HIDDEN>) id 1jloWw-0004NY-0i
 for 41918 <at> debbugs.gnu.org; Thu, 18 Jun 2020 03:00:11 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay2.suse.de (unknown [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id 3A329AD25;
 Thu, 18 Jun 2020 07:00:08 +0000 (UTC)
Subject: Re: bug#41918: [PATCH] Propagate error value of auto-loaded command
To: jcb62281@HIDDEN
References: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
 <5EEAA504.40803@HIDDEN>
From: Tom de Vries <tdevries@HIDDEN>
Autocrypt: addr=tdevries@HIDDEN; keydata=
 xsBNBF0ltCcBCADDhsUnMMdEXiHFfqJdXeRvgqSEUxLCy/pHek88ALuFnPTICTwkf4g7uSR7
 HvOFUoUyu8oP5mNb4VZHy3Xy8KRZGaQuaOHNhZAT1xaVo6kxjswUi3vYgGJhFMiLuIHdApoc
 u5f7UbV+egYVxmkvVLSqsVD4pUgHeSoAcIlm3blZ1sDKviJCwaHxDQkVmSsGXImaAU+ViJ5l
 CwkvyiiIifWD2SoOuFexZyZ7RUddLosgsO0npVUYbl6dEMq2a5ijGF6/rBs1m3nAoIgpXk6P
 TCKlSWVW6OCneTaKM5C387972qREtiArTakRQIpvDJuiR2soGfdeJ6igGA1FZjU+IsM5ABEB
 AAHNH1RvbSBkZSBWcmllcyA8dGRldnJpZXNAc3VzZS5kZT7CwKsEEwEIAD4WIQSsnSe5hKbL
 MK1mGmjuhV2rbOJEoAUCXSW0JwIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAh
 CRDuhV2rbOJEoBYhBKydJ7mEpsswrWYaaO6FXats4kSgc48H/Ra2lq5p3dHsrlQLqM7N68Fo
 eRDf3PMevXyMlrCYDGLVncQwMw3O/AkousktXKQ42DPJh65zoXB22yUt8m0g12xkLax98KFJ
 5NyUloa6HflLl+wQL/uZjIdNUQaHQLw3HKwRMVi4l0/Jh/TygYG1Dtm8I4o708JS4y8GQxoQ
 UL0z1OM9hyM3gI2WVTTyprsBHy2E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(X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.9.0
MIME-Version: 1.0
In-Reply-To: <5EEAA504.40803@HIDDEN>
Content-Type: multipart/mixed; boundary="------------D157CF553F884F7427B0AD2E"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41918
Cc: 41918 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------D157CF553F884F7427B0AD2E
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

On 6/18/20 1:19 AM, Jacob Bachmeyer wrote:
> Tom de Vries wrote:
>> Hi,
>>
>> I think I found a bug in proc unknown in lib/framework.exp.
>>
>> Patch describing the problem and fixing it attached below.
>>   
> I found a similar issue while patching bug #41824; please check whether
> that patch addresses this issue adequately.

AFAICT, it does not.  Dejagnu test-case attached.

Thanks,
- Tom



--------------D157CF553F884F7427B0AD2E
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-Add-abort-throw.exp.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0002-Add-abort-throw.exp.patch"

Add abort-throw.exp

Todo: Don't create a tclIndex in the source dir.

runtest.log:
...
Running abort-throw.exp ...
PASS: running abort-throw.exp
UNRESOLVED: testcase 'abort-throw.exp' aborted at call to unknown command 'foo'

                ===  Summary ===

\# of expected passes            1
\# of unresolved testcases       1
WARNING: No tool specified
WARNING: Couldn't find tool config file for unix, using default.
ERROR: (DejaGnu) proc "foo" does not exist.
The error code is ARITH DIVZERO {divide by zero}
The info on the error is:
divide by zero
    while executing
"throw {ARITH DIVZERO {divide by zero}} {divide by zero}"
    (procedure "foo" line 2)
    invoked from within
"::tcl_unknown foo"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 ::tcl_unknown $args"
FAIL: continue after throw
...

---
 testsuite/runtest.main/abort.exp                   |  5 ++++
 .../abort/testsuite/abort.test/abort-throw.exp     | 31 ++++++++++++++++++++++
 .../abort/testsuite/abort.test/lib/foo.tcl         |  3 +++
 3 files changed, 39 insertions(+)

diff --git a/testsuite/runtest.main/abort.exp b/testsuite/runtest.main/abort.exp
index c5f7014..c65d539 100644
--- a/testsuite/runtest.main/abort.exp
+++ b/testsuite/runtest.main/abort.exp
@@ -50,6 +50,11 @@ set tests {
 	"PASS: running abort-undef.exp.*\
 	*UNRESOLVED: .* aborted at call to unknown command.*\
 	*expected passes\[ \t\]+1\n.*unresolved testcases\[ \t\]+1\n" }
+    { "continue after throw"
+	"abort-throw.exp simple.exp"
+	"PASS: running abort-throw.exp.*\
+	*PASS: simple test.*\
+	*expected passes\[ \t\]+2\n" }
     { "stop at abort without --keep_going"
 	"abort-undef.exp simple.exp"
 	"PASS: running abort-undef.exp.*\
diff --git a/testsuite/runtest.main/abort/testsuite/abort.test/abort-throw.exp b/testsuite/runtest.main/abort/testsuite/abort.test/abort-throw.exp
new file mode 100644
index 0000000..3e7c1f3
--- /dev/null
+++ b/testsuite/runtest.main/abort/testsuite/abort.test/abort-throw.exp
@@ -0,0 +1,31 @@
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Invoke a divide-by-zero command, in an auto-loaded proc.
+
+pass "running abort-throw.exp"
+
+file delete $srcdir/$subdir/tclIndex
+
+auto_mkindex $srcdir/$subdir lib/*.tcl
+
+lappend auto_path $srcdir/$subdir
+
+foo
+
+fail "script did not abort"
diff --git a/testsuite/runtest.main/abort/testsuite/abort.test/lib/foo.tcl b/testsuite/runtest.main/abort/testsuite/abort.test/lib/foo.tcl
new file mode 100644
index 0000000..d623172
--- /dev/null
+++ b/testsuite/runtest.main/abort/testsuite/abort.test/lib/foo.tcl
@@ -0,0 +1,3 @@
+proc foo { } {
+    throw {ARITH DIVZERO {divide by zero}} {divide by zero}
+}

--------------D157CF553F884F7427B0AD2E--




Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at 41918 <at> debbugs.gnu.org:


Received: (at 41918) by debbugs.gnu.org; 17 Jun 2020 23:19:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 17 19:19:56 2020
Received: from localhost ([127.0.0.1]:52409 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jlhLX-0001cz-NX
	for submit <at> debbugs.gnu.org; Wed, 17 Jun 2020 19:19:56 -0400
Received: from mail-ot1-f54.google.com ([209.85.210.54]:39257)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jcb62281@HIDDEN>) id 1jlhLI-0001cW-4U
 for 41918 <at> debbugs.gnu.org; Wed, 17 Jun 2020 19:19:54 -0400
Received: by mail-ot1-f54.google.com with SMTP id g5so3070891otg.6
 for <41918 <at> debbugs.gnu.org>; Wed, 17 Jun 2020 16:19:40 -0700 (PDT)
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:cc:subject
 :references:in-reply-to:content-transfer-encoding;
 bh=Rk4q6YGBtBgOxbMXCTZ/wHuFmsRxk8yvNPh7ZB33Tds=;
 b=DthmfAN0oLn8kSaoeVQuCO8wVLg+c/1eaLXJHN5S2tSuH32Pnnu+KK2c+AdZv4L53p
 DI1CQ3ibC+/WeENT7Tw5SHsNjGnRbIGA7D3WXOCMC+9brG13PchKKvtU6d7XRi8q2ozE
 pGbEhnaVFHZNnczQseqp8jP3790PPtjtS/iaIW4Mw88wOv77uSbhWZ1vmpmdms4fFJPH
 rR7lz0xVi9AHIjN0W8wHZfAJNKy6THUOPjP9/ErI4JAUkvZ+cdZK1vSUWDF9faTDyHNd
 y0246ytR5FpRPXI9829qH9U4cBvX65T5hrJZoqGo9cGIcYjkfFWzwX1Y3BMw0F+Q5735
 /Ntg==
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:cc:subject:references:in-reply-to
 :content-transfer-encoding;
 bh=Rk4q6YGBtBgOxbMXCTZ/wHuFmsRxk8yvNPh7ZB33Tds=;
 b=fxj+M6DuoJ3P3WsnVZIQeoYYiLfSYpAg0UVtHt4z5/+oEy40/ClF+Tu8iAFKl7vYf4
 mgHTZfv5eYx1/L+Ea4Gf6dezeKD0HRFmBaFkcQbSccmPSH9DgIZbOL0g8Vc2lGfe1NC0
 YNPF1zhmBN1L/QG94gtI6T0gSXjmizehZiDfR+hzOw/ecJvwHZ05Nfe7SVoFybLQvHoy
 k4gYHGK/CbpssiKHwONOzKekXjh0DvUq2NVdwhIM+3kIZWTV8Feq4Z0OKyYUW2QbEG/9
 jhzAwcgnBme/JWRGL8InwreJdBqcu7wa9W03JcyQDAa6V6NekSc1ik/j2z2tMAyR3j+Q
 0xMA==
X-Gm-Message-State: AOAM533MHWkQLs4gu1nIFzJT+BDWPd2nWKqPr0S2L2ShvAS6wL12wtTB
 vK53tAHYxBq+hUZt7LC/cEA=
X-Google-Smtp-Source: ABdhPJyrwBGpJOiih4t0/kngPAXJj11wJzOslAss8DloVtC8+0Wn8Mx00kJnKXa3EA9wbvlEDoPLTQ==
X-Received: by 2002:a9d:6ad5:: with SMTP id m21mr1149032otq.307.1592435974568; 
 Wed, 17 Jun 2020 16:19:34 -0700 (PDT)
Received: from [192.168.2.42] (adsl-70-133-145-204.dsl.ablntx.sbcglobal.net.
 [70.133.145.204])
 by smtp.gmail.com with ESMTPSA id n128sm269061oih.33.2020.06.17.16.19.33
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Wed, 17 Jun 2020 16:19:34 -0700 (PDT)
Message-ID: <5EEAA504.40803@HIDDEN>
Date: Wed, 17 Jun 2020 18:19:32 -0500
From: Jacob Bachmeyer <jcb62281@HIDDEN>
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: Tom de Vries <tdevries@HIDDEN>
Subject: Re: bug#41918: [PATCH] Propagate error value of auto-loaded command
References: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
In-Reply-To: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41918
Cc: 41918 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: jcb62281@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Tom de Vries wrote:
> Hi,
>
> I think I found a bug in proc unknown in lib/framework.exp.
>
> Patch describing the problem and fixing it attached below.
>   
I found a similar issue while patching bug #41824; please check whether 
that patch addresses this issue adequately.

-- Jacob





Information forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Jun 2020 12:34:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 17 08:34:23 2020
Received: from localhost ([127.0.0.1]:50699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jlXGp-0002ZS-9c
	for submit <at> debbugs.gnu.org; Wed, 17 Jun 2020 08:34:23 -0400
Received: from lists.gnu.org ([209.51.188.17]:55276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tdevries@HIDDEN>) id 1jlXGn-0002ZJ-I3
 for submit <at> debbugs.gnu.org; Wed, 17 Jun 2020 08:34:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33716)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tdevries@HIDDEN>) id 1jlXGn-0001Y9-B5
 for bug-dejagnu@HIDDEN; Wed, 17 Jun 2020 08:34:21 -0400
Received: from mx2.suse.de ([195.135.220.15]:38954)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tdevries@HIDDEN>) id 1jlXGj-0003Hi-7Y
 for bug-dejagnu@HIDDEN; Wed, 17 Jun 2020 08:34:20 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay2.suse.de (unknown [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id 6A74CAAC6
 for <bug-dejagnu@HIDDEN>; Wed, 17 Jun 2020 12:34:19 +0000 (UTC)
To: bug-dejagnu@HIDDEN
From: Tom de Vries <tdevries@HIDDEN>
Subject: [PATCH] Propagate error value of auto-loaded command
Autocrypt: addr=tdevries@HIDDEN; keydata=
 xsBNBF0ltCcBCADDhsUnMMdEXiHFfqJdXeRvgqSEUxLCy/pHek88ALuFnPTICTwkf4g7uSR7
 HvOFUoUyu8oP5mNb4VZHy3Xy8KRZGaQuaOHNhZAT1xaVo6kxjswUi3vYgGJhFMiLuIHdApoc
 u5f7UbV+egYVxmkvVLSqsVD4pUgHeSoAcIlm3blZ1sDKviJCwaHxDQkVmSsGXImaAU+ViJ5l
 CwkvyiiIifWD2SoOuFexZyZ7RUddLosgsO0npVUYbl6dEMq2a5ijGF6/rBs1m3nAoIgpXk6P
 TCKlSWVW6OCneTaKM5C387972qREtiArTakRQIpvDJuiR2soGfdeJ6igGA1FZjU+IsM5ABEB
 AAHNH1RvbSBkZSBWcmllcyA8dGRldnJpZXNAc3VzZS5kZT7CwKsEEwEIAD4WIQSsnSe5hKbL
 MK1mGmjuhV2rbOJEoAUCXSW0JwIb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PmKXX25B115MMzkSKlv4udfx7KdyxHrTSkwWZArLQiEZj5KG4cCKhIoMygPTA3U
 yGaIvI/BGOtHZ7bEBVUCFDFfOWJ26IOCoPnSVUvKPEOH9dv+sNy7jyBsP5QxeTqwxC/1ZtNS
 DUCSFQjqA6bEGwM22dP8OUY6SC94x1G81A9/xbtm9LQxKm0EiDH8KBMLfQ==
Message-ID: <094e896a-a245-0781-084e-3bae616ff47c@HIDDEN>
Date: Wed, 17 Jun 2020 14:34:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.9.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1DE4BFC4638EDD664C16DAAC"
Content-Language: en-US
Received-SPF: pass client-ip=195.135.220.15; envelope-from=tdevries@HIDDEN;
 helo=mx2.suse.de
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/17 00:06:30
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x (no timestamps) [generic]
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,
 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This is a multi-part message in MIME format.
--------------1DE4BFC4638EDD664C16DAAC
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi,

I think I found a bug in proc unknown in lib/framework.exp.

Patch describing the problem and fixing it attached below.

Thanks,
- Tom


--------------1DE4BFC4638EDD664C16DAAC
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-Propagate-error-value-of-auto-loaded-command.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0002-Propagate-error-value-of-auto-loaded-command.patch"

Propagate error value of auto-loaded command

Consider a library file foo.tcl:
...
proc foo { } {
    throw {ARITH DIVZERO {divide by zero}} {divide by zero}
}
...
and a test-case test.tcl:
...
\#!/usr/bin/tclsh

auto_mkindex lib *.tcl

lappend auto_path [pwd]/lib

foo
...
which gives us:
...
divide by zero
    while executing
"throw {ARITH DIVZERO {divide by zero}} {divide by zero}"
    (procedure "foo" line 2)
    invoked from within
"foo"
    (file "./test.tcl" line 7)
...

When overriding the ::unknown command using:
...
rename ::unknown ::tcl_unknown
proc unknown args {
    if {[catch {uplevel 1 ::tcl_unknown $args} msg]} {
        puts "ERROR: proc \"$args\" does not exist: $msg"
        exit
    } else {
        return $msg
    }
}
...
we have instead:
...
$ ./test.tcl
ERROR: proc "foo" does not exist: divide by zero
...

This can be fixed by testing for the specific error code, and otherwise
propagating the error:
...
proc unknown args {
    set code [catch {uplevel 1 ::tcl_unknown $args} msg]
    if { $code == 1 } {
        global errorInfo errorCode
        if { [lindex errorCode 0] eq "TCL"
             && [lindex errorCode 1] eq "LOOKUP"
             && [lindex errorCode 2] eq "COMMAND"
             && [lindex errorCode 3] eq [lindex $args 0] } {
            puts "ERROR: proc \"$args\" does not exist: $msg"
            exit
        }

        return -code error -errorinfo $errorInfo -errorcode $errorCode $msg
    }

    return -code $code $msg
}
...

Fix unknown in lib/framework.exp accordingly.

ChangeLog:

2020-06-17  Tom de Vries  <tdevries@HIDDEN>

	* lib/framework.exp (unknown): Propagate error value of auto-loaded
	command.

---
 lib/framework.exp | 34 +++++++++++++++++++++-------------
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/lib/framework.exp b/lib/framework.exp
index c9875d2..1347cc1 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -258,24 +258,32 @@ proc isnative { } {
 
 rename ::unknown ::tcl_unknown
 proc unknown args {
-    if {[catch {uplevel 1 ::tcl_unknown $args} msg]} {
+    set code [catch {uplevel 1 ::tcl_unknown $args} msg]
+    if { $code  == 1 } {
 	global errorCode
 	global errorInfo
 	global exit_status
-
-	clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist."
-	if {[info exists errorCode]} {
-	    send_error "The error code is $errorCode\n"
-	}
-	if {[info exists errorInfo]} {
-	    send_error "The info on the error is:\n$errorInfo\n"
+	if { [lindex errorCode 0] eq "TCL"
+	     && [lindex errorCode 1] eq "LOOKUP"
+	     && [lindex errorCode 2] eq "COMMAND"
+	     && [lindex errorCode 3] eq [lindex $args 0] } {
+	    clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist."
+	    if {[info exists errorCode]} {
+		send_error "The error code is $errorCode\n"
+	    }
+	    if {[info exists errorInfo]} {
+		send_error "The info on the error is:\n$errorInfo\n"
+	    }
+	    set exit_status 2
+	    log_and_exit
 	}
-	set exit_status 2
-	log_and_exit
-    } else {
-	# Propagate return value.
-	return $msg
+
+	# Propagate error
+	return -code error -errorinfo $errorInfo -errorcode $errorCode $msg
     }
+
+    # Propagate return value.
+    return -code $code $msg
 }
 
 # Print output to stdout (or stderr) and to log file

--------------1DE4BFC4638EDD664C16DAAC--




Acknowledgement sent to Tom de Vries <tdevries@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-dejagnu@HIDDEN. Full text available.
Report forwarded to bug-dejagnu@HIDDEN:
bug#41918; Package dejagnu. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 1 Jul 2020 05:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.