bd144c
commit 21788250c945713fa25c16f2683e1f9cd0bb6ccf
bd144c
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
bd144c
Date:   Sun Jun 25 12:40:53 2017 +0000
bd144c
bd144c
    Fix some tests failure with GDB 8.0
bd144c
    
bd144c
    At the beginning of a Valgrind gdbserver test,
bd144c
    2 messages are produced when launching the command
bd144c
       target remote | vgdb
bd144c
    
bd144c
    A message output by vgdb:
bd144c
       relaying data between gdb and process <pid>
bd144c
    (this message is read by GDB from the vgdb pipe, and re-output
bd144c
    on stderr)
bd144c
    and a message produced by GDB:
bd144c
       Remote debugging using | ./vgdb
bd144c
    
bd144c
    GDB 8.0 changes the order in which the above messages are output.
bd144c
    This causes 2 tests to fail, as the 'relaying' line appears
bd144c
    then in a part of the output deleted by a filter script.
bd144c
    
bd144c
    To avoid this, change the filter scripts to always remove
bd144c
    this 'relaying line', which is not particularly interesting to check.
bd144c
    All the .exp files containining such a 'relaying' line are updated
bd144c
    accordingly.
bd144c
    
bd144c
    This has been tested with various gdb versions (7.5, 7.7, 7.12, 8.0)
bd144c
    on amd64 and/or ppc64.
bd144c
    
bd144c
    Thanks to Mark Wielaard, which helped to investigate this problem
bd144c
    by bisecting the GDB patches in GDB 8.0 causing this change of
bd144c
    behaviour.
bd144c
    
bd144c
    
bd144c
    
bd144c
    
bd144c
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16453 a5019735-40e9-0310-863c-91ae7b9d1cf9
bd144c
bd144c
diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
bd144c
index 7177720..ed78cfe 100755
bd144c
--- a/gdbserver_tests/filter_gdb
bd144c
+++ b/gdbserver_tests/filter_gdb
bd144c
@@ -72,7 +72,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
bd144c
     -e '/^Missing separate debuginfo/d'                                                               \
bd144c
     -e '/\/_exit.c: No such file or directory/d'                                                      \
bd144c
     -e '/^Try: zypper install -C/d'                                                                   \
bd144c
-    -e 's/\(relaying data between gdb and process \)[0-9][0-9]*/\1..../'                              \
bd144c
+    -e '/relaying data between gdb and process/d'                                                     \
bd144c
     -e 's/pid [0-9][0-9]*/pid ..../g'                                                                 \
bd144c
     -e 's/Thread [0-9][0-9]*/Thread ..../g'                                                           \
bd144c
     -e '/\[Switching to Thread ....\]/d'                                                              \
bd144c
diff --git a/gdbserver_tests/filter_vgdb b/gdbserver_tests/filter_vgdb
bd144c
index 2442ec5..f8028a3 100755
bd144c
--- a/gdbserver_tests/filter_vgdb
bd144c
+++ b/gdbserver_tests/filter_vgdb
bd144c
@@ -11,7 +11,7 @@ $dir/../tests/filter_addresses                  |
bd144c
 #             pid
bd144c
 # gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
bd144c
 # filter a debian 6.0/ppc32 line
bd144c
-sed -e 's/\(relaying data between gdb and process \)[0-9][0-9]*/\1..../' \
bd144c
+sed -e '/relaying data between gdb and process/d'                        \
bd144c
     -e 's/\(sending command .* to pid \)[0-9][0-9]*/\1..../'             \
bd144c
     -e '/Cannot access memory at address 0x......../d'                   \
bd144c
     -e '/^[1-9][0-9]*	\.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' |
bd144c
diff --git a/gdbserver_tests/hginfo.stderrB.exp b/gdbserver_tests/hginfo.stderrB.exp
bd144c
index df47f11..669ff92 100644
bd144c
--- a/gdbserver_tests/hginfo.stderrB.exp
bd144c
+++ b/gdbserver_tests/hginfo.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 Lock ga 0x........ {
bd144c
  Address 0x........ is 0 bytes inside data symbol "mx"
bd144c
diff --git a/gdbserver_tests/mcblocklistsearch.stderrB.exp b/gdbserver_tests/mcblocklistsearch.stderrB.exp
bd144c
index 312d776..1313321 100644
bd144c
--- a/gdbserver_tests/mcblocklistsearch.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcblocklistsearch.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 Breakpoint 1 at 0x........: file leak-tree.c, line 42.
bd144c
 Breakpoint 2 at 0x........: file leak-tree.c, line 67.
bd144c
diff --git a/gdbserver_tests/mcbreak.stderrB.exp b/gdbserver_tests/mcbreak.stderrB.exp
bd144c
index 65281d2..0f051d1 100644
bd144c
--- a/gdbserver_tests/mcbreak.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcbreak.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 vgdb-error value changed from 999999 to 0
bd144c
 n_errs_found 1 n_errs_shown 1 (vgdb-error 0) 
bd144c
diff --git a/gdbserver_tests/mcclean_after_fork.stderrB.exp b/gdbserver_tests/mcclean_after_fork.stderrB.exp
bd144c
index 995b42f..e812b8e 100644
bd144c
--- a/gdbserver_tests/mcclean_after_fork.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcclean_after_fork.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 monitor command request to kill this process
bd144c
 Remote connection closed
bd144c
diff --git a/gdbserver_tests/mcinfcallWSRU.stderrB.exp b/gdbserver_tests/mcinfcallWSRU.stderrB.exp
bd144c
index 7789123..a2f2b87 100644
bd144c
--- a/gdbserver_tests/mcinfcallWSRU.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcinfcallWSRU.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 Breakpoint 1 at 0x........: file sleepers.c, line 74.
bd144c
 Continuing.
bd144c
diff --git a/gdbserver_tests/mcleak.stderrB.exp b/gdbserver_tests/mcleak.stderrB.exp
bd144c
index 7782119..7ed3920 100644
bd144c
--- a/gdbserver_tests/mcleak.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcleak.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 10 bytes in 1 blocks are still reachable in loss record ... of ...
bd144c
    at 0x........: malloc (vg_replace_malloc.c:...)
bd144c
diff --git a/gdbserver_tests/mcmain_pic.stderrB.exp b/gdbserver_tests/mcmain_pic.stderrB.exp
bd144c
index c90e1fa..53ec0ce 100644
bd144c
--- a/gdbserver_tests/mcmain_pic.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcmain_pic.stderrB.exp
bd144c
@@ -1,2 +1 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
diff --git a/gdbserver_tests/mcvabits.stderrB.exp b/gdbserver_tests/mcvabits.stderrB.exp
bd144c
index bdabb1e..f9ced7a 100644
bd144c
--- a/gdbserver_tests/mcvabits.stderrB.exp
bd144c
+++ b/gdbserver_tests/mcvabits.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 Address 0x........ len 10 addressable
bd144c
  Address 0x........ is 0 bytes inside data symbol "undefined"
bd144c
diff --git a/gdbserver_tests/mssnapshot.stderrB.exp b/gdbserver_tests/mssnapshot.stderrB.exp
bd144c
index 8bee8fc..e419ce6 100644
bd144c
--- a/gdbserver_tests/mssnapshot.stderrB.exp
bd144c
+++ b/gdbserver_tests/mssnapshot.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 general valgrind monitor commands:
bd144c
   help [debug]            : monitor command help. With debug: + debugging commands
bd144c
diff --git a/gdbserver_tests/nlgone_abrt.stderrB.exp b/gdbserver_tests/nlgone_abrt.stderrB.exp
bd144c
index c8b2024..e69de29 100644
bd144c
--- a/gdbserver_tests/nlgone_abrt.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlgone_abrt.stderrB.exp
bd144c
@@ -1 +0,0 @@
bd144c
-relaying data between gdb and process ....
bd144c
diff --git a/gdbserver_tests/nlgone_exit.stderrB.exp b/gdbserver_tests/nlgone_exit.stderrB.exp
bd144c
index c8b2024..e69de29 100644
bd144c
--- a/gdbserver_tests/nlgone_exit.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlgone_exit.stderrB.exp
bd144c
@@ -1 +0,0 @@
bd144c
-relaying data between gdb and process ....
bd144c
diff --git a/gdbserver_tests/nlgone_return.stderrB.exp b/gdbserver_tests/nlgone_return.stderrB.exp
bd144c
index c8b2024..e69de29 100644
bd144c
--- a/gdbserver_tests/nlgone_return.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlgone_return.stderrB.exp
bd144c
@@ -1 +0,0 @@
bd144c
-relaying data between gdb and process ....
bd144c
diff --git a/gdbserver_tests/nlpasssigalrm.stderrB.exp b/gdbserver_tests/nlpasssigalrm.stderrB.exp
bd144c
index c90e1fa..53ec0ce 100644
bd144c
--- a/gdbserver_tests/nlpasssigalrm.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlpasssigalrm.stderrB.exp
bd144c
@@ -1,2 +1 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
diff --git a/gdbserver_tests/nlself_invalidate.stderrB.exp b/gdbserver_tests/nlself_invalidate.stderrB.exp
bd144c
index c8b2024..e69de29 100644
bd144c
--- a/gdbserver_tests/nlself_invalidate.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlself_invalidate.stderrB.exp
bd144c
@@ -1 +0,0 @@
bd144c
-relaying data between gdb and process ....
bd144c
diff --git a/gdbserver_tests/nlsigvgdb.stderrB.exp b/gdbserver_tests/nlsigvgdb.stderrB.exp
bd144c
index 672fea5..ed5bb61 100644
bd144c
--- a/gdbserver_tests/nlsigvgdb.stderrB.exp
bd144c
+++ b/gdbserver_tests/nlsigvgdb.stderrB.exp
bd144c
@@ -1,4 +1,3 @@
bd144c
-relaying data between gdb and process ....
bd144c
 vgdb-error value changed from 0 to 999999
bd144c
 gdbserver: continuing in 5000 ms ...
bd144c
 gdbserver: continuing after wait ...