]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.dwarf2/dw2-filename.exp with -readnow
authorTom de Vries <tdevries@suse.de>
Wed, 28 Oct 2020 09:01:32 +0000 (10:01 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 28 Oct 2020 09:01:32 +0000 (10:01 +0100)
When running test-case gdb.dwarf2/dw2-filename.exp with target board -readnow,
we run into:
...
FAIL: gdb.dwarf2/dw2-filename.exp: info sources
...

The normal output is:
...
(gdb) info sources^M
Source files for which symbols have been read in:^M
^M
Source files for which symbols will be read in on demand:^M
^M
src/gdb/testsuite/gdb.dwarf2/file1.txt^M
(gdb)
...
but with -readnow file1.txt appears in the "Source files for which symbols
have been read in" catagory instead, as expected.

Fix the FAIL by making the regexp match the -readnow output.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/dw2-filename.exp: Update regexp for -readnow.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-filename.exp

index 20555ec46468f0b91706c45af9a97cedcfbb5798..4fa4ac7c5c7c2e050901224d9ba5b0838e4261d9 100644 (file)
@@ -1,3 +1,7 @@
+2020-10-28  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.dwarf2/dw2-filename.exp: Update regexp for -readnow.
+
 2020-10-28  Tom de Vries  <tdevries@suse.de>
 
        * gdb.dwarf2/dw2-stack-boundary.exp: KFAILing the complaints for
index 5879c4f3a59f2b941229e5f8061277f9cc9fbbcd..a04a6d6cf9322ad2019bb175bfab128ddd967aa8 100644 (file)
@@ -40,4 +40,4 @@ gdb_test "interpreter-exec mi -file-list-exec-source-files" \
          ".*{file=\"file1\\.txt\",fullname=\".+file1\\.txt\"}.*"
 
 # And `info sources' should return the fullname incl. the directories.
-gdb_test "info sources" {[/\\]file1\.txt}
+gdb_test "info sources" {[/]file1\.txt.*}