]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.dwarf2/forward-spec.exp with read1
authorTom de Vries <tdevries@suse.de>
Sat, 15 Jul 2023 08:09:40 +0000 (10:09 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 15 Jul 2023 08:09:40 +0000 (10:09 +0200)
When running test-case gdb.dwarf2/forward-spec.exp with check-read1 we run
into:
...
    parent:     ((cooked_index_entry *) 0xFAIL: <exp>: v has a parent
7fdc1c002ed0) [ns]^M
...

The problem is using regexps containing '.' to avoid escaping, which makes
them too generic.

Fix this by eliminating the '.' from the regexps.

Tested on x86_64-linux.

gdb/testsuite/gdb.dwarf2/forward-spec.exp

index ac7d16b09b8a65faaf0936c7142041d4c47413c2..f4512cf9b8cac7d40cb345245b33812ebb2c3e3c 100644 (file)
@@ -74,7 +74,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
 
 set in_v 0
 gdb_test_multiple "maint print objfiles" "v has a parent" {
-    -re "^ *\\\[\[0-9\]\\\] *..cooked_index_entry\[^\r\n\]*" {
+    -re "^ *\\\[\[0-9\]\\\] *\\(\\(cooked_index_entry\[^\r\n\]*" {
        set in_v 0
        exp_continue
     }
@@ -82,7 +82,7 @@ gdb_test_multiple "maint print objfiles" "v has a parent" {
        set in_v 1
        exp_continue
     }
-    -re "^ *parent: *..cooked_index_entry .. (0|$hex)." {
+    -re "^ *parent: *\\(\\(cooked_index_entry \\*\\) (0|$hex)\\)" {
        if {$in_v} {
            if {$expect_out(1,string) == "0"} {
                fail $gdb_test_name