From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom de Vries <tdevries@suse.de>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Ignore pass/fail/unsupported in gdb-caching-proc.exp
Date: Mon, 17 Feb 2020 23:58:00 -0000 [thread overview]
Message-ID: <a561fe64-ddd7-2fc3-300d-1fa2be12b6be@polymtl.ca> (raw)
In-Reply-To: <e7865e7b-c252-0deb-2ea2-60b7256810d3@suse.de>
On 2020-02-17 6:23 p.m., Tom de Vries wrote:
> diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
> index 9933cc951e..0689eeb239 100644
> --- a/gdb/testsuite/lib/ada.exp
> +++ b/gdb/testsuite/lib/ada.exp
> @@ -52,9 +52,9 @@ proc target_compile_ada_from_dir {builddir source dest type options} {
> return -options $options $result
> }
>
> -# Compile some Ada code.
> +# Compile some Ada code. Return "" if the compile was successful.
>
> -proc gdb_compile_ada {source dest type options} {
> +proc gdb_compile_ada_1 {source dest type options} {
>
> set srcdir [file dirname $source]
> set gprdir [file dirname $srcdir]
> @@ -80,6 +80,15 @@ proc gdb_compile_ada {source dest type options} {
> # We therefore simply check whether the dest file has been created
> # or not. Unless not present, the build has succeeded.
> if [file exists $dest] { set result "" }
> + return $result
> +}
> +
> +# Compile some Ada code. Generate "PASS: foo.exp: compilation SOURCE" if the
> +# compile was successful.
> +
> +proc gdb_compile_ada {source dest type options} {
> + set result [gdb_compile_ada_1 $source $dest $type $options]
> +
> gdb_compile_test $source $result
> return $result
> }
> @@ -162,15 +171,13 @@ gdb_caching_proc gnat_runtime_has_debug_info {
> set src "$srcdir/lib/gnat_debug_info_test.adb"
> set dst [standard_output_file "gnat_debug_info_test"]
>
> - if { [gdb_compile_ada $src $dst executable {debug}] != "" } {
> - fail "failed to compile gnat-debug-info test binary"
> + if { [gdb_compile_ada_1 $src $dst executable {debug}] != "" } {
> return 0
> }
>
> clean_restart $dst
>
> if { ! [runto "GNAT_Debug_Info_Test"] } {
> - fail "failed to run to GNAT_Debug_Info_Test"
> return 0
> }
>
> @@ -183,7 +190,6 @@ gdb_caching_proc gnat_runtime_has_debug_info {
> }
> default {
> # Some other unexpected output...
> - fail $gdb_test_name
> }
> }
>
I'd be tempted to keep these last two "fail"s. They should not show up normally,
regardless of whether gnatmake is installed. But let's say:
- the Ada runtime ever changes (__gnat_debug_raise_exception is renamed), or
- the output of the command "whatis __gnat_debug_raise_exception" changes
then they'll show up, which is desirable because it means we need to come
and change something here. If the output of
"whatis __gnat_debug_raise_exception" changes in a way that it is not
recognized anymore and there is no FAIL, then gnat_runtime_has_debug_info
will just start returning false all the time and we might not notice it for a
while.
Simon
next prev parent reply other threads:[~2020-02-17 23:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 10:58 Tom de Vries
2020-02-13 14:32 ` Tom Tromey
2020-02-13 15:02 ` Tom de Vries
2020-02-17 20:52 ` Simon Marchi
2020-02-17 23:23 ` Tom de Vries
2020-02-17 23:58 ` Simon Marchi [this message]
[not found] ` <e5d1fcce-1d24-29cf-e7e2-6ea177092ab2@suse.de>
2020-02-18 10:59 ` [RFC][gdb/testsuite] Ignore pass in gdb_caching_proc Tom de Vries
2020-02-18 15:29 ` Tom Tromey
2020-02-19 6:07 ` Tom de Vries
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=a561fe64-ddd7-2fc3-300d-1fa2be12b6be@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=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