public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Don't test interface.exp without GNAT debug info
@ 2022-03-17 14:39 Tom Tromey
  2022-03-20  6:02 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2022-03-17 14:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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".
---
 gdb/testsuite/gdb.ada/interface.exp | 5 +++++
 1 file changed, 5 insertions(+)

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 ]] != "" } {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Don't test interface.exp without GNAT debug info
  2022-03-17 14:39 [PATCH] Don't test interface.exp without GNAT debug info Tom Tromey
@ 2022-03-20  6:02 ` Joel Brobecker
  2022-03-28 12:42   ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2022-03-20  6:02 UTC (permalink / raw)
  To: Tom Tromey via Gdb-patches; +Cc: Tom Tromey, Joel Brobecker

Hi Tom,

On Thu, Mar 17, 2022 at 08:39:05AM -0600, Tom Tromey via Gdb-patches wrote:
> 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".

Thanks for the patch. It looks good to me.

> ---
>  gdb/testsuite/gdb.ada/interface.exp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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 ]] != "" } {
> -- 
> 2.34.1
> 

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Don't test interface.exp without GNAT debug info
  2022-03-20  6:02 ` Joel Brobecker
@ 2022-03-28 12:42   ` Tom Tromey
  2022-04-10 19:13     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2022-03-28 12:42 UTC (permalink / raw)
  To: Joel Brobecker via Gdb-patches; +Cc: Joel Brobecker, Tom Tromey

>> 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]] != "" } {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Don't test interface.exp without GNAT debug info
  2022-03-28 12:42   ` Tom Tromey
@ 2022-04-10 19:13     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2022-04-10 19:13 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Joel Brobecker via Gdb-patches, Joel Brobecker

> >> 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.

Thanks again, Tom. Looks good to me.

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-10 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 14:39 [PATCH] Don't test interface.exp without GNAT debug info Tom Tromey
2022-03-20  6:02 ` Joel Brobecker
2022-03-28 12:42   ` Tom Tromey
2022-04-10 19:13     ` Joel Brobecker

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).