Blame SOURCES/gdb-testsuite-readline63-sigint.patch

2f9ed3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
2f9ed3
From: Fedora GDB patches <invalid@email.com>
2f9ed3
Date: Fri, 27 Oct 2017 21:07:50 +0200
2f9ed3
Subject: gdb-testsuite-readline63-sigint.patch
2f9ed3
2f9ed3
;; [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka).
2f9ed3
;;=fedoratest
2f9ed3
2f9ed3
gdb/users/ppalka/readline-7.0-update
2f9ed3
commit 379059215e823555a37a8dc7e02cef8fd86566e4
2f9ed3
https://sourceware.org/ml/gdb-patches/2015-07/msg00422.html
2f9ed3
Message-Id: <1436927724-4059-1-git-send-email-patrick@parcs.ath.cx>
2f9ed3
https://bugzilla.redhat.com/show_bug.cgi?id=1301175
2f9ed3
2f9ed3
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
2f9ed3
--- a/gdb/testsuite/gdb.gdb/selftest.exp
2f9ed3
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
2f9ed3
@@ -113,9 +113,25 @@ proc test_with_self { } {
2f9ed3
     }
2f9ed3
     
2f9ed3
     set description "send SIGINT signal to child process"
2f9ed3
-    gdb_test "signal SIGINT" \
2f9ed3
-	"Continuing with signal SIGINT.*" \
2f9ed3
-	"$description"
2f9ed3
+    gdb_test_multiple "signal SIGINT" "$description" {
2f9ed3
+	-re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n" {
2f9ed3
+	    pass "$description"
2f9ed3
+	}
2f9ed3
+    }
2f9ed3
+
2f9ed3
+    set description "send ^C to child process again"
2f9ed3
+    send_gdb "\003"
2f9ed3
+    gdb_expect {
2f9ed3
+	-re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" {
2f9ed3
+	    pass "$description"
2f9ed3
+	}
2f9ed3
+	-re ".*$gdb_prompt $" {
2f9ed3
+	    fail "$description"
2f9ed3
+	}
2f9ed3
+	timeout {
2f9ed3
+	    fail "$description (timeout)"
2f9ed3
+	}
2f9ed3
+    }
2f9ed3
 
2f9ed3
     # Switch back to the GDB thread if Guile support is linked in.
2f9ed3
     # "signal SIGINT" could also switch the current thread.