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] [gdb/testsuite] Fix gdb.gdb/selftest.exp regexp


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

commit abc6c00fb6cbb199348ec5f0bf4d969ed48bdfad
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Aug 13 18:57:50 2019 +0200

    [gdb/testsuite] Fix gdb.gdb/selftest.exp regexp
    
    With gdb.gdb/selftest.exp, we get:
    ...
    (xgdb) PASS: gdb.gdb/selftest.exp: send SIGINT signal to child process
    ^M
    Thread 1 "xgdb" received signal SIGINT, Interrupt.^M
    0x00007ffff5bf01db in poll () from /lib64/libc.so.6^M
    (gdb) FAIL: gdb.gdb/selftest.exp: send ^C to child process again
    ...
    
    The failure is due to gdb printing 'Thread 1 "xgdb" received signal SIGINT',
    but the regexp in the test-case expecting 'Program received signal SIGINT'.
    
    Fix this by updating the regexp, similar to how that is done earlier in the
    test-case.
    
    gdb/testsuite/ChangeLog:
    
    2019-08-13  Tom de Vries  <tdevries@suse.de>
    
    	* gdb.gdb/selftest.exp (send ^C to child process again): Accept also
    	Thread.

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

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2cd9a00..e4b9616 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-13  Tom de Vries  <tdevries@suse.de>
+
+	* gdb.gdb/selftest.exp (send ^C to child process again): Accept also
+	Thread.
+
 2019-08-13  Sandra Loosemore  <sandra@codesourcery.com>
 
 	* gdb.python/py-completion.exp: Download the .py file to the host
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 9651561..2f481ec 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -119,7 +119,7 @@ proc test_with_self { } {
     set description "send ^C to child process again"
     send_gdb "\003"
     gdb_expect {
-	-re "Program received signal SIGINT.*$gdb_prompt $" {
+	-re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" {
 	    pass "$description"
 	}
 	-re ".*$gdb_prompt $" {


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