public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Joel Brobecker via Gdb-patches <gdb-patches@sourceware.org>
Cc: Joel Brobecker <brobecker@adacore.com>,  Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH] Don't test interface.exp without GNAT debug info
Date: Mon, 28 Mar 2022 06:42:35 -0600	[thread overview]
Message-ID: <87pmm6gsec.fsf@tromey.com> (raw)
In-Reply-To: <YjbDdoMw5YNi5R5m@adacore.com> (Joel Brobecker via Gdb-patches's message of "Sun, 20 Mar 2022 10:02:30 +0400")

>> The test gdb.ada/interface.exp requires some debug info in the GNAT
>> runtime.  When run without this info, the test can't pass.  This patch
>> changes the test to detect this situation and stop the test with
>> "untested".

Joel> Thanks for the patch. It looks good to me.

I looked today and found a few more tests that I think fall into this
same category, so I updated the patch.  Let me know what you think.

Tom

commit 913bc929e540f5de879f9b20075acbff1183527d
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Mar 17 08:36:01 2022 -0600

    Require GNAT debug info for some Ada tests
    
    A few Ada tests require some debug info in the GNAT runtime.  When run
    without this info, these tests can't pass.  This patch changes these
    tests to detect this situation and stop with "untested".

diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index 834da12b153..06b9660113b 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -17,6 +17,11 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
+if {![gnat_runtime_has_debug_info]} {
+    untested "GNAT runtime debuginfo required for this test"
+    return -1
+}
+
 standard_ada_testfile foo
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index 6f522ffb4f3..5d24ae5fd58 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -17,6 +17,11 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
+if {![gnat_runtime_has_debug_info]} {
+    untested "GNAT runtime debuginfo required for this test"
+    return -1
+}
+
 standard_ada_testfile p
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index 89e2fde7b7b..fa176e21ef1 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -17,6 +17,11 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
+if {![gnat_runtime_has_debug_info]} {
+    untested "GNAT runtime debuginfo required for this test"
+    return -1
+}
+
 standard_ada_testfile foo
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat12 ]] != "" } {
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index 0e9d15faa0c..6fb8a418149 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -17,6 +17,11 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
+if {![gnat_runtime_has_debug_info]} {
+    untested "GNAT runtime debuginfo required for this test"
+    return -1
+}
+
 standard_ada_testfile foo
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 664a50deb09..3649c5474a7 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -17,6 +17,11 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
+if {![gnat_runtime_has_debug_info]} {
+    untested "GNAT runtime debuginfo required for this test"
+    return -1
+}
+
 standard_ada_testfile p
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {

  reply	other threads:[~2022-03-28 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 14:39 Tom Tromey
2022-03-20  6:02 ` Joel Brobecker
2022-03-28 12:42   ` Tom Tromey [this message]
2022-04-10 19:13     ` Joel Brobecker

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=87pmm6gsec.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).