From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25056 invoked by alias); 17 Jan 2016 08:27:18 -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 25038 invoked by uid 89); 17 Jan 2016 08:27:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=that!, itd, Hx-languages-length:1163, it'd X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 17 Jan 2016 08:27:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3D2E31169E3; Sun, 17 Jan 2016 03:27:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8ZwRKnnLu0wD; Sun, 17 Jan 2016 03:27:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 00BAF1169E0; Sun, 17 Jan 2016 03:27:13 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id E92D74080A; Sun, 17 Jan 2016 12:27:09 +0400 (RET) Date: Sun, 17 Jan 2016 08:27:00 -0000 From: Joel Brobecker To: Simon Marchi Cc: Pedro Alves , dejagnu@gnu.org, gdb-patches Subject: Re: How to abort a test? Message-ID: <20160117082709.GC4059@adacore.com> 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> <56991FB0.5090109@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56991FB0.5090109@ericsson.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-01/txt/msg00349.txt.bz2 Hi Simon, > 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... I admit that some of it flying a little over my head... Does it mean that we will be able to abort a test if we detect a timeout? This is one of the things I wanted to do, but didn't have a solution for, so it'd be fantastic if it helped with that! -- Joel