Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Suppress stap-trace.exp when compilation fails
Date: Wed, 23 May 2012 17:34:00 -0000	[thread overview]
Message-ID: <m3396qol7v.fsf@redhat.com> (raw)
In-Reply-To: <4FBD1B16.7080606@redhat.com> (Keith Seitz's message of "Wed, 23	May 2012 10:15:02 -0700")

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  <keiths@redhat.com>
>
> 	* 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


  reply	other threads:[~2012-05-23 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 17:15 Keith Seitz
2012-05-23 17:34 ` Sergio Durigan Junior [this message]
2012-05-23 17:37 ` Pedro Alves
2012-05-23 18:21   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3396qol7v.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox