diff options
author | Tom Tromey <tromey@adacore.com> | 2023-01-19 09:30:18 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-01-20 10:05:39 -0700 |
commit | 75890dfaf1f8de54271d2e048810c4bfd3edfe95 (patch) | |
tree | bdeb1eac576c386923a79281850754cf35be1371 /gdb | |
parent | b70bff5ea52550c7cd48af7579a75ac2624ec13d (diff) | |
download | gdb-75890dfaf1f8de54271d2e048810c4bfd3edfe95.zip gdb-75890dfaf1f8de54271d2e048810c4bfd3edfe95.tar.gz gdb-75890dfaf1f8de54271d2e048810c4bfd3edfe95.tar.bz2 |
Make gdb.ada/ptype_tagged_param.exp pass
gdb.ada/ptype_tagged_param.exp is failing for me on x86-64 Fedora 36.
However, it's actually generating the correct output -- it is just
that the test thinks that the "ptype" will not work because I do not
have the GNAT debuginfo installed.
This patch changes the code to accept either result, and then to issue
a kfail as appropriate.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp index 0050d60..eaf61dd 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp @@ -31,23 +31,27 @@ if {![runto "pck.adb:20"]} { return -1 } -# Identifying the runtime type of S can only be done when we have the debug -# info for the GNAT runtime. - -if { $has_runtime_debug_info } { - gdb_test "ptype s" \ - [multi_line \ - "type = <ref> new pck.shape with record" \ - " r: integer;" \ - "end record"] \ - "ptype s, with debug info" -} else { - gdb_test "ptype s" \ - [multi_line \ - "type = <ref> tagged record" \ - " x: integer;" \ - " y: integer;" \ - "end record" ] \ - "ptype s, without debug info" +# With some versions of the compiler, identifying the runtime type of +# S can only be done when we have the debug info for the GNAT runtime. +set ordinary [multi_line \ + "type = <ref> new pck.shape with record" \ + " r: integer;" \ + "end record"] +set nodebug [multi_line \ + "type = <ref> tagged record" \ + " x: integer;" \ + " y: integer;" \ + "end record"] + +gdb_test_multiple "ptype s" "ptype s" { + -re -wrap $ordinary { + pass $gdb_test_name + } + -re -wrap $nodebug { + if {$has_runtime_debug_info} { + kfail "no debug info" $gdb_test_name + } else { + fail $gdb_test_name + } + } } - |