This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove dead code in testsuite
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 21 Dec 2015 19:39:13 -0000
- Subject: [binutils-gdb] Remove dead code in testsuite
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=10125099f09197b325c7e0e7f2af6d3c04f929a6
commit 10125099f09197b325c7e0e7f2af6d3c04f929a6
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Mon Dec 21 14:38:51 2015 -0500
Remove dead code in testsuite
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.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.base/break.exp | 35 ++++++-----------------------------
gdb/testsuite/gdb.base/sepdebug.exp | 37 ++++++-------------------------------
3 files changed, 17 insertions(+), 60 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b1f19d9..5ea5cf5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-21 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.base/break.exp: Remove dead code.
+ * gdb.base/sepdebug.exp: Likewise.
+
2015-12-21 Simon Marchi <simon.marchi@polymtl.ca>
* gdb.asm/asm-source.exp: Remove HP-UX references.
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.