From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [committed][gdb/testsuite] Disable vgdb tests if xml not supported
Date: Thu, 30 Sep 2021 23:41:53 +0200 [thread overview]
Message-ID: <c39a2698-74fc-78b0-e025-cadaa953bb9e@suse.de> (raw)
In-Reply-To: <87pmsq0y4m.fsf@tromey.com>
On 9/30/21 7:30 PM, Tom Tromey wrote:
> Tom> +if { [gdb_skip_xml_test] } {
> Tom> + # Valgrind gdbserver requires gdb with xml support.
> Tom> + return 0
> Tom> +}
>
> Do we want/need an 'untested' in there?
>
Ack, will do.
> I wonder if there's a better way to handle these checks, and also
> checking for whether compilation succeeded -- that is, remove the
> repeated code blocks in favor of some kind of wrapper that uses "return
> -code" (but not an exception) to short-circuit the calling .exp file on
> failure. Probably a big task though.
I suppose we could do in lib/gdb.exp:
...
proc require_xml_support {} {
if { [gdb_skip_xml_test] } {
untested "missing xml support"
return -code return 0
}
}
...
and then in the test-case we're left with the relatively brief:
...
require_xml_support
...
Or perhaps you mean more generically (which wouldn't require us to write
a proc for each type of require):
...
proc require { fn val } {
if { [$fn] != $val } {
untested "$fn != $val"
return -code return 0
}
}
...
and:
...
require gdb_skip_xml_test 0
...
?
Thanks,
- Tom
next prev parent reply other threads:[~2021-09-30 21:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 13:55 Tom de Vries via Gdb-patches
2021-09-30 17:30 ` Tom Tromey
2021-09-30 21:41 ` Tom de Vries via Gdb-patches [this message]
2021-09-30 21:47 ` Tom de Vries via Gdb-patches
2021-10-05 18:15 ` Tom Tromey
2021-10-06 7:40 ` [PATCH][gdb/testsuite] Add proc require in lib/gdb.exp Tom de Vries via Gdb-patches
2021-10-07 11:00 ` [PATCH][gdb/testsuite] Prevent compilation fails with unix/-fPIE/-pie Tom de Vries via Gdb-patches
2021-10-08 14:37 ` Tom de Vries via Gdb-patches
2021-10-11 10:28 ` [PATCH][gdb/testsuite] Add proc require in lib/gdb.exp Tom de Vries via Gdb-patches
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=c39a2698-74fc-78b0-e025-cadaa953bb9e@suse.de \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tom@tromey.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