From 30381905027c37181180a2d850316396df22eab3 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Mon, 18 May 2015 07:38:53 -0400 Subject: [PATCH] Update "signal SIGINT" test --- gdb/testsuite/gdb.gdb/selftest.exp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 9f25a48bae2..6170ac815f6 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" { + pass "$description" + } + } + + set description "send ^C to child process again" + send_gdb "\003" + gdb_expect { + -re "Program received signal SIGINT.*$gdb_prompt $" { + pass "$description" + } + -re ".*$gdb_prompt $" { + fail "$description" + } + timeout { + fail "$description (timeout)" + } + } + # get a stack trace # -- 2.47.2