From patchwork Mon Dec 21 18:14:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 10101 Received: (qmail 56397 invoked by alias); 21 Dec 2015 18:14:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 56388 invoked by uid 89); 21 Dec 2015 18:14:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=1020, nonexistent, suppressed X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 21 Dec 2015 18:14:41 +0000 Received: from EUSAAHC006.ericsson.se (Unknown_Domain [147.117.188.90]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 29.FF.06940.68048765; Mon, 21 Dec 2015 19:10:14 +0100 (CET) Received: from elxcz23q12-y4.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.90) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 21 Dec 2015 13:14:37 -0500 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] Remove dead code in testsuite Date: Mon, 21 Dec 2015 13:14:33 -0500 Message-ID: <1450721673-7188-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch removes cases from the testsuite that are not posssibly used. The messages "Catch of * not yet implemented" were removed here: https://www.sourceware.org/ml/gdb-patches/2004-01/msg00679.html I changed the regexp at the same time to match the string more closely. gdb/testsuite/ChangeLog: * gdb.base/break.exp: Remove dead code. * gdb.base/sepdebug.exp: Likewise. --- gdb/testsuite/gdb.base/break.exp | 35 ++++++----------------------------- gdb/testsuite/gdb.base/sepdebug.exp | 37 ++++++------------------------------- 2 files changed, 12 insertions(+), 60 deletions(-) diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 6ca910c..63fc42b 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -473,37 +473,14 @@ gdb_test "catch" \ "Catch requires an event name." \ "catch requires an event name" +gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \ + "set catch fork, never expected to trigger" -set name "set catch fork, never expected to trigger" -gdb_test_multiple "catch fork" "$name" { - -re "Catchpoint \[0-9\]* .fork..*$gdb_prompt $" { - pass $name - } - -re "Catch of fork not yet implemented.*$gdb_prompt $" { - pass $name - } -} +gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \ + "set catch vfork, never expected to trigger" - -set name "set catch vfork, never expected to trigger" -gdb_test_multiple "catch vfork" "$name" { - -re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $" { - pass $name - } - -re "Catch of vfork not yet implemented.*$gdb_prompt $" { - pass $name - } -} - -set name "set catch exec, never expected to trigger" -gdb_test_multiple "catch exec" "$name" { - -re "Catchpoint \[0-9\]* .exec..*$gdb_prompt $" { - pass $name - } - -re "Catch of exec not yet implemented.*$gdb_prompt $" { - pass $name - } -} +gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \ + "set catch exec, never expected to trigger" # Verify that GDB responds gracefully when asked to set a breakpoint # on a nonexistent source line. diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 29b4c8c..f7de5a4 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -283,39 +283,14 @@ if ![runto_main] then { fail "sepdebug tests suppressed" } gdb_test "catch" "Catch requires an event name.*" \ "catch requires an event name" -set name "set catch fork, never expected to trigger" -gdb_test_multiple "catch fork" $name { - -re "Catchpoint \[0-9\]* .fork.*$gdb_prompt $" { - pass $name - } - -re "Catch of fork not yet implemented.*$gdb_prompt $" { - pass $name - } -} +gdb_test "catch fork" "Catchpoint \[0-9\]+ \\(fork\\)" \ + "set catch fork, never expected to trigger" -# If we are on HP-UX 10.20, we expect an error message to be -# printed if we type "catch vfork" at the gdb gdb_prompt. This is -# because on HP-UX 10.20, we cannot catch vfork events. - -set name "set catch vfork, never expected to trigger" -gdb_test_multiple "catch vfork" $name { - -re "Catchpoint \[0-9\]* .vfork.*$gdb_prompt $" { - pass $name - } - -re "Catch of vfork not yet implemented.*$gdb_prompt $" { - pass $name - } -} +gdb_test "catch vfork" "Catchpoint \[0-9\]+ \\(vfork\\)" \ + "set catch vfork, never expected to trigger" -set name "set catch exec, never expected to trigger" -gdb_test_multiple "catch exec" $name { - -re "Catchpoint \[0-9\]* .exec.*$gdb_prompt $" { - pass $name - } - -re "Catch of exec not yet implemented.*$gdb_prompt $" { - pass $name - } -} +gdb_test "catch exec" "Catchpoint \[0-9\]+ \\(exec\\)" \ + "set catch exec, never expected to trigger" # Verify that GDB responds gracefully when asked to set a breakpoint # on a nonexistent source line.