This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make gdb.base/foll-exec.exp test pattern more general


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b129b0cacd4c8e982605b7c8d99e96c74155882a

commit b129b0cacd4c8e982605b7c8d99e96c74155882a
Author: Luis Machado <lgustavo@codesourcery.com>
Date:   Fri Oct 28 08:45:27 2016 -0500

    Make gdb.base/foll-exec.exp test pattern more general
    
    Testing a powerpc toolchain running gdbserver on the other end i noticed a
    failure in gdb.base/foll-exec.exp.  Turns out gdb is outputting a slightly
    different pattern due to the presence of debug information.
    
    --
    foll-exec is about to execlp(execd-prog)...^M
    Continuing.^M
    process 21222 is executing new program: gdb.d/outputs/gdb.base/foll-exec/execd-prog^M
    ^M
    Catchpoint 2 (exec'd gdb.d/outputs/gdb.base/foll-exec/execd-prog), _start () at ../sysdeps/powerpc/powerpc32/dl-start.S:32^M
    --
    
    Notice the presence of source file information.
    
    Now, on my local machine, i get this:
    
    --
    foll-exec is about to execlp(execd-prog)...^M
    Continuing.^M
    process 9285 is executing new program: gdb/testsuite/outputs/gdb.base/foll-exec/execd-prog^M
    ^M
    Catchpoint 2 (exec'd gdb/testsuite/outputs/gdb.base/foll-exec/execd-prog), 0x00007ffff7dd7cc0 in ?? () from /lib64/ld-linux-x86-64.so.2^M
    --
    
    So the output differs slightly and the testcase is actually expecting only
    the second form with the "in" anchor.
    
    This patch removes the "in" pattern and lets the test match both kinds of
    output.
    
    gdb/testsuite/ChangeLog:
    
    2016-10-28  Luis Machado  <lgustavo@codesourcery.com>
    
    	* gdb.base/foll-exec.exp (do_exec_tests): Make test pattern more
    	general.

Diff:
---
 gdb/testsuite/ChangeLog              | 5 +++++
 gdb/testsuite/gdb.base/foll-exec.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d0a2bc9..31b82eb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-28  Luis Machado  <lgustavo@codesourcery.com>
+
+	* gdb.base/foll-exec.exp (do_exec_tests): Make test pattern more
+	general.
+
 2016-10-25  Luis Machado  <lgustavo@codesourcery.com>
 
 	* gdb.base/exec-invalid-sysroot.exp: New file.
diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp
index 8859f9f..f496cca 100644
--- a/gdb/testsuite/gdb.base/foll-exec.exp
+++ b/gdb/testsuite/gdb.base/foll-exec.exp
@@ -191,7 +191,7 @@ proc do_exec_tests {} {
 
    send_gdb "continue\n"
    gdb_expect {
-     -re ".*xecuting new program:.*${testfile2}.*Catchpoint .*(exec\'d .*${testfile2}).*in .*$gdb_prompt $"\
+     -re ".*xecuting new program:.*${testfile2}.*Catchpoint .*(exec\'d .*${testfile2}).*$gdb_prompt $"\
                      {pass "hit catch exec"}
      -re "$gdb_prompt $" {fail "hit catch exec"}
      timeout         {fail "(timeout) hit catch exec"}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]