[PATCH 1/7] gdb/testsuite: Don't build a program for cvexpr.exp's last tests
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
The final "nodebug" block of gdb.base/cvexpr.exp exercises GDB's type
parser -- "ptype _Atomic int", "ptype int * restrict", and the C++
equivalents. These tests don't reference any symbol from the test
program, so its test program is compiled with no debug info. However,
there really is no reason to compile and load a program at all.
Replace the prepare_for_testing call with a plain clean_restart, and
change the block's test prefix from "nodebug" to "type parsing", which
describe better what the tests do.
This is preparation for a following commit that renames the "nodebug"
option to "symtab". Compiling the test program here with "symtab"
made it a bit more obvious that semantically something was off.
Change-Id: I9b7c3eceb19f857c258b37342a8000d96552a29b
---
gdb/testsuite/gdb.base/cvexpr.exp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp
index f556d38803b..8660289addb 100644
--- a/gdb/testsuite/gdb.base/cvexpr.exp
+++ b/gdb/testsuite/gdb.base/cvexpr.exp
@@ -515,11 +515,10 @@ foreach testspec $specs {
}
}
-# These tests don't rely on the debug format.
-with_test_prefix nodebug {
- if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
- return
- }
+# These tests don't rely on the debug format, nor on any program
+# symbol, only on GDB's type parser.
+with_test_prefix "type parsing" {
+ clean_restart
gdb_test "ptype _Atomic int" "type = _Atomic int"
gdb_test "ptype int * restrict" "type = int \\* restrict"
--
2.54.0