From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2877 invoked by alias); 23 May 2012 17:34:30 -0000 Received: (qmail 2801 invoked by uid 22791); 23 May 2012 17:34:29 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 May 2012 17:34:16 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4NHYFPK005744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 May 2012 13:34:15 -0400 Received: from psique (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4NHYDbd029230; Wed, 23 May 2012 13:34:14 -0400 From: Sergio Durigan Junior To: Keith Seitz Cc: "gdb-patches\@sourceware.org ml" Subject: Re: [RFA] Suppress stap-trace.exp when compilation fails References: <4FBD1B16.7080606@redhat.com> X-URL: http://www.redhat.com Date: Wed, 23 May 2012 17:34:00 -0000 In-Reply-To: <4FBD1B16.7080606@redhat.com> (Keith Seitz's message of "Wed, 23 May 2012 10:15:02 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2012-05/txt/msg00906.txt.bz2 On Wednesday, May 23 2012, Keith Seitz wrote: > This patch addresses this by fixing the compile wrapper to always > return a valid value and checking this procedure's return value before > running the tests. > > Okay? Thanks for catching this. It's OK for me, but IANAM. > Keith > > testsuite/ChangeLog > > 2012-05-23 Keith Seitz > > * gdb.trace/stap-trace.exp: If compile_stap_bin fails, > return -1 to suppress the rest of the tests. > (compile_stap_bin): Return boolean success value. > diff --git a/gdb/testsuite/gdb.trace/stap-trace.exp b/gdb/testsuite/gdb.trace/stap-trace.exp > index 562eec4..088d14c 100644 > --- a/gdb/testsuite/gdb.trace/stap-trace.exp > +++ b/gdb/testsuite/gdb.trace/stap-trace.exp > @@ -46,8 +46,10 @@ proc compile_stap_bin {exec_name {arg ""}} { > "$binfile_dir/$exec_name" \ > executable [concat $arg debug nowarnings]] != "" } { > untested "Could not compile ${srcfile}" > - return -1 > + return 0 > } > + > + return 1 > } > > proc prepare_for_trace_test {} { > @@ -105,7 +107,10 @@ proc gdb_collect_probe_arg { msg probe val_arg0 } { > "collect $msg: collected probe arg0" > } > > -compile_stap_bin "stap-probe-nosem" > +if {![compile_stap_bin "stap-probe-nosem"]} { > + # An appropriate failure message has already been output > + return -1 > +} > > clean_restart $executable > if { ![runto_main] } { -- Sergio