* [PATCH] Remove dead code in testsuite
@ 2015-12-21 18:14 Simon Marchi
2015-12-21 18:28 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2015-12-21 18:14 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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.
--
2.5.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove dead code in testsuite
2015-12-21 18:14 [PATCH] Remove dead code in testsuite Simon Marchi
@ 2015-12-21 18:28 ` Pedro Alves
2015-12-21 19:39 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-12-21 18:28 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 12/21/2015 06:14 PM, Simon Marchi wrote:
> 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
>
LGTM.
> I changed the regexp at the same time to match the string more closely.
>
(Could have used $decimal too.)
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove dead code in testsuite
2015-12-21 18:28 ` Pedro Alves
@ 2015-12-21 19:39 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2015-12-21 19:39 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 15-12-21 01:28 PM, Pedro Alves wrote:
> LGTM.
>
>> I changed the regexp at the same time to match the string more closely.
>>
>
> (Could have used $decimal too.)
>
> Thanks,
> Pedro Alves
>
Thanks, pushed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-21 19:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21 18:14 [PATCH] Remove dead code in testsuite Simon Marchi
2015-12-21 18:28 ` Pedro Alves
2015-12-21 19:39 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox