From 5a2431c2463d8128f539a2764528137972dbbbd0 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Jan 31 2016 14:48:57 +0000 Subject: [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). --- diff --git a/gdb-testsuite-guile.patch b/gdb-testsuite-guile.patch index 37fae76..65b7fbe 100644 --- a/gdb-testsuite-guile.patch +++ b/gdb-testsuite-guile.patch @@ -113,17 +113,13 @@ index 4d55cb5..da7a80b 100644 pass "$description" } -re ".*$gdb_prompt $" { -@@ -453,6 +454,10 @@ proc test_with_self { executable } { - gdb_test "signal SIGINT" \ - "Continuing with signal SIGINT.*" \ - "$description" -+ +@@ -477,6 +478,9 @@ proc test_with_self { executable } { + } + } + + # Switch back to the GDB thread if Guile support is linked in. + # "signal SIGINT" could also switch the current thread. + gdb_test "thread 1" {\[Switching to thread 1 .*\].*} # get a stack trace # - ---r5Pyd7+fXNt84Ff3-- - diff --git a/gdb-testsuite-readline63-sigint.patch b/gdb-testsuite-readline63-sigint.patch new file mode 100644 index 0000000..4ca4716 --- /dev/null +++ b/gdb-testsuite-readline63-sigint.patch @@ -0,0 +1,40 @@ +gdb/users/ppalka/readline-7.0-update +commit 379059215e823555a37a8dc7e02cef8fd86566e4 +https://sourceware.org/ml/gdb-patches/2015-07/msg00422.html +Message-Id: <1436927724-4059-1-git-send-email-patrick@parcs.ath.cx> +https://bugzilla.redhat.com/show_bug.cgi?id=1301175 + +diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp +index 9f25a48..5deae7d 100644 +--- a/gdb/testsuite/gdb.gdb/selftest.exp ++++ b/gdb/testsuite/gdb.gdb/selftest.exp +@@ -444,9 +444,26 @@ proc test_with_self { executable } { + } + + set description "send SIGINT signal to child process" +- gdb_test "signal SIGINT" \ +- "Continuing with signal SIGINT.*" \ +- "$description" ++ gdb_test_multiple "signal SIGINT" "$description" { ++ -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n" { ++ pass "$description" ++ } ++ } ++ ++ set description "send ^C to child process again" ++ send_gdb "\003" ++ gdb_expect { ++ -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" { ++ pass "$description" ++ } ++ -re ".*$gdb_prompt $" { ++ fail "$description" ++ } ++ timeout { ++ fail "$description (timeout)" ++ } ++ } ++ + + # get a stack trace + # diff --git a/gdb.spec b/gdb.spec index 487f0db..0c49f96 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc} # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 46%{?dist} +Release: 47%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -555,6 +555,9 @@ Patch1073: gdb-opcodes-clflushopt-test.patch # Fix testsuite regression with Guile. Patch1074: gdb-testsuite-guile.patch +# [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). +Patch1075: gdb-testsuite-readline63-sigint.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -867,6 +870,7 @@ find -name "*.info*"|xargs rm -f %patch642 -p1 %patch337 -p1 %patch331 -p1 +%patch1075 -p1 %patch1074 -p1 %if 0%{?rhel:1} && 0%{?rhel} <= 7 @@ -1385,6 +1389,9 @@ then fi %changelog +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-47.fc24 +- [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). + * Fri Jan 22 2016 Jan Kratochvil - 7.10.50.20160121-46.fc24 - Fix gdb.gdb/selftest.exp false FAIL.