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

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