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

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