]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix ERROR in gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
authorTom de Vries <tdevries@suse.de>
Thu, 28 Jan 2021 07:14:58 +0000 (08:14 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 28 Jan 2021 07:14:58 +0000 (08:14 +0100)
When running test-case gdb.dwarf2/dw2-out-of-range-end-of-seq.exp on a
system with debug packages installed, I run into:
...
(gdb) maint info line-table^M
  ... <lots of output> ...
ERROR: internal buffer is full.
UNRESOLVED: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: \
  END with address 1 eliminated
...

Fix this by limiting the output of the command using a regexp.

I also noticed that when making the regexp match nothing, meaning
the command has no output, the test didn't FAIL.  Fixed this by adding a
PASS pattern.

I also noticed that the FAIL pattern didn't work with -m32, fixed that as
well.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-01-28  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: Add regexp to
"maint info line-table".  Make PASS pattern more specific.  Make
FAIL pattern work for -m32.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp

index 814c6ded1e02307ee230a390cd847f713558ddb5..9256c071746ef9bcbfbda0af63218f8178b13e73 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-28  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: Add regexp to
+       "maint info line-table".  Make PASS pattern more specific.  Make
+       FAIL pattern work for -m32.
+
 2021-01-27  Lancelot SIX  <lsix@lancelotsix.com>
 
        PR gdb/27133
index 7a32a01389c89ed22f5dd562f4d4e83dd2cd8401..42cfd0b61ec641d9cb493bcf7b970e9163a9f822 100644 (file)
@@ -84,11 +84,12 @@ if ![runto_main] {
     return -1
 }
 
-gdb_test_multiple "maint info line-table" "END with address 1 eliminated" {
-    -re -wrap "END *0x0*1 Y \r\n.*" {
+set test "END with address 1 eliminated"
+gdb_test_multiple "maint info line-table $srcfile$" $test {
+    -re -wrap "END *0x0*1 *Y \r\n.*" {
        fail $gdb_test_name
     }
-    -re -wrap "" {
+    -re -wrap "END *$hex *Y " {
        pass $gdb_test_name
     }
 }