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

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