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