From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117175 invoked by alias); 15 Jan 2016 16:35:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 117157 invoked by uid 89); 15 Jan 2016 16:35:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=1475, 160114, fantastic, our X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 15 Jan 2016 16:34:59 +0000 Received: from EUSAAHC004.ericsson.se (Unknown_Domain [147.117.188.84]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id A6.DC.06940.37D19965; Fri, 15 Jan 2016 17:25:23 +0100 (CET) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.86) with Microsoft SMTP Server id 14.3.248.2; Fri, 15 Jan 2016 11:34:56 -0500 Subject: Re: How to abort a test? To: Pedro Alves , , gdb-patches References: <56958359.8070708@ericsson.com> <5697CC09.8010306@redhat.com> <5697D721.1000305@ericsson.com> <5697DABA.8010008@redhat.com> <5697FA6C.7060703@ericsson.com> <5697FB9E.3080906@redhat.com> From: Simon Marchi Message-ID: <56991FB0.5090109@ericsson.com> Date: Fri, 15 Jan 2016 16:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5697FB9E.3080906@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00326.txt.bz2 On 16-01-14 02:48 PM, Pedro Alves wrote: >> Anyway, the point is not to fix it for my particular case, but to make the general >> testsuite more robust. I think I'll send a patch for Dejagnu for the "unresolved" >> solution, and see what the maintainers think. > > If you're willing to do the leg work, that's fantastic, of course. I feel completely stupid now. Just under the line I pasted in my original message, there is this comment: 1474 if { [catch "uplevel #0 source $test_file_name"] == 1 } { 1475 # If we have a Tcl error, propogate the exit status do make 1476 # notices the error. 1477 global exit_status exit_error 1478 # exit error is set by a command line option 1479 if { $exit_status == 0 } { 1480 set exit_status $exit_error 1481 } After searching where this goes, I saw the --status argument to runtest: --status Set the exit status to fail on Tcl errors. Turns out we just need to add this to our runtest invocation to make it return non-zero when a test driver, as it calls the test .exp's, fails. So we just need to add this to our call to runtest (will send a patch later). Sometimes it can be worth it to read the man page first...