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

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