Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: RFC: consolidate checks for _Unwind_DebugHook in test suite
Date: Wed, 15 Aug 2012 00:53:00 -0000	[thread overview]
Message-ID: <502AF2C3.4090507@codesourcery.com> (raw)
In-Reply-To: <877gt1zbr5.fsf@fleche.redhat.com>

On 08/15/2012 12:20 AM, Tom Tromey wrote:
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 17e2117..daa50f5 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -2093,6 +2093,43 @@ proc skip_hw_watchpoint_access_tests {} {
>       return 0
>   }
>
> +# Return 1 if we should skip tests that require the runtime unwinder
> +# hook.  This must be invoked while gdb is running, after shared
> +# libraries have been loaded.  This is needed because otherwise a
> +# shared libgcc won't be visible.
> +
> +proc skip_unwinder_tests {} {
> +    global gdb_prompt
> +
> +    set ok 1
> +    gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" {
> +	-re "= .*no debug info.*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
> +	    # Pass the test so we don't get bogus fails in the results.
> +	    pass "check for unwinder hook"

Do we really need to put "pass" here?  skip_* proc in lib/gdb.exp is to 
do some check and return a boolean value.  We don't have to generate any 
PASS or FAIL during checking.  I'd like to remove them.

> +	    set ok 0
> +	}
> +	-re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
> +	    pass "check for unwinder hook"
> +	}
> +	-re "No symbol .* in current context.\r\n$gdb_prompt $" {
> +	    # Pass the test so we don't get bogus fails in the results.
> +	    pass "check for unwinder hook"
> +	    set ok 0
> +	}
> +    }
> +    if {!$ok} {
> +	gdb_test_multiple "info probe" "check for stap probe in unwinder" {
> +	    -re ".*libgcc.*unwind.*\r\n$gdb_prompt $" {
> +		pass "check for stap probe in unwinder"
> +		set ok 1
> +	    }
> +	    -re "\r\n$gdb_prompt $" {
> +	    }
> +	}
> +    }
> +    return $ok
> +}
> +


-- 
Yao


  reply	other threads:[~2012-08-15  0:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 16:20 Tom Tromey
2012-08-15  0:53 ` Yao Qi [this message]
2012-08-15 13:58   ` Tom Tromey
2012-08-22 14:26 ` Tom Tromey
2012-08-23  9:50 ` [PATCH 1/2] Append "." in error message Yao Qi
2012-08-23  9:50   ` [PATCH 2/2] Remove pass in skip_unwinder_tests Yao Qi
2012-08-23 10:52     ` Pedro Alves
2012-08-23 12:29       ` Yao Qi
2012-08-23 18:03         ` Pedro Alves
2012-08-24 13:38     ` Jan Kratochvil
2012-08-24 15:41       ` Pedro Alves
2012-08-24 16:19         ` Jan Kratochvil
2012-08-24 16:53           ` Pedro Alves
2012-08-24 16:57             ` Pedro Alves
2012-08-24 17:12             ` Jan Kratochvil
2012-08-27 10:33           ` Yao Qi
2012-08-27 13:07             ` Jan Kratochvil
2012-08-27 15:15               ` Yao Qi
2012-08-27 15:57                 ` Jan Kratochvil
2012-08-24 13:34   ` [PATCH 1/2] Append "." in error message Jan Kratochvil
2012-08-24 13:40 ` RFC: consolidate checks for _Unwind_DebugHook in test suite Jan Kratochvil
2012-08-24 13:54   ` Tom Tromey
2012-08-24 14:08     ` Jan Kratochvil
2012-08-24 15:26       ` Tom Tromey

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=502AF2C3.4090507@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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