* [PATCH] gdb/testsuite: Remove use of dejagnu cleanup proc
@ 2018-02-02 12:56 Andrew Burgess
2018-02-03 4:59 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess @ 2018-02-02 12:56 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
The 'cleanup' proc has been removed from dejagnu (Feb 15 2016). The
proc has not done anything useful since at least 2001 so removing
these calls should be harmless.
gdb/testsuite/ChangeLog:
* config/sid.exp (gdb_target_sid): Remove use of cleanup.
* config/sim.exp (gdb_target_sim): Remove use of cleanup.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/config/sid.exp | 2 --
gdb/testsuite/config/sim.exp | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp
index 36bd8611966..8ff0263b618 100644
--- a/gdb/testsuite/config/sid.exp
+++ b/gdb/testsuite/config/sid.exp
@@ -146,7 +146,6 @@ proc gdb_target_sid { } {
gdb_expect {
-re ".*\[Ee\]rror.*$gdb_prompt $" {
perror "Couldn't set target for remote simulator."
- cleanup
gdb_exit
}
-re "Remote debugging using.*$gdb_prompt" {
@@ -154,7 +153,6 @@ proc gdb_target_sid { } {
}
timeout {
perror "Couldn't set target for remote simulator."
- cleanup
gdb_exit
}
}
diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp
index 7170a259837..d9072febc6a 100644
--- a/gdb/testsuite/config/sim.exp
+++ b/gdb/testsuite/config/sim.exp
@@ -34,7 +34,6 @@ proc gdb_target_sim { } {
}
timeout {
perror "Couldn't set target for simulator."
- cleanup
return -1
}
}
--
2.14.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: Remove use of dejagnu cleanup proc
2018-02-02 12:56 [PATCH] gdb/testsuite: Remove use of dejagnu cleanup proc Andrew Burgess
@ 2018-02-03 4:59 ` Simon Marchi
2018-02-03 16:53 ` Andrew Burgess
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2018-02-03 4:59 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
On 2018-02-02 07:56, Andrew Burgess wrote:
> The 'cleanup' proc has been removed from dejagnu (Feb 15 2016). The
> proc has not done anything useful since at least 2001 so removing
> these calls should be harmless.
>
> gdb/testsuite/ChangeLog:
>
> * config/sid.exp (gdb_target_sid): Remove use of cleanup.
> * config/sim.exp (gdb_target_sim): Remove use of cleanup.
> ---
> gdb/testsuite/ChangeLog | 5 +++++
> gdb/testsuite/config/sid.exp | 2 --
> gdb/testsuite/config/sim.exp | 1 -
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/gdb/testsuite/config/sid.exp
> b/gdb/testsuite/config/sid.exp
> index 36bd8611966..8ff0263b618 100644
> --- a/gdb/testsuite/config/sid.exp
> +++ b/gdb/testsuite/config/sid.exp
> @@ -146,7 +146,6 @@ proc gdb_target_sid { } {
> gdb_expect {
> -re ".*\[Ee\]rror.*$gdb_prompt $" {
> perror "Couldn't set target for remote simulator."
> - cleanup
> gdb_exit
> }
> -re "Remote debugging using.*$gdb_prompt" {
> @@ -154,7 +153,6 @@ proc gdb_target_sid { } {
> }
> timeout {
> perror "Couldn't set target for remote simulator."
> - cleanup
> gdb_exit
> }
> }
> diff --git a/gdb/testsuite/config/sim.exp
> b/gdb/testsuite/config/sim.exp
> index 7170a259837..d9072febc6a 100644
> --- a/gdb/testsuite/config/sim.exp
> +++ b/gdb/testsuite/config/sim.exp
> @@ -34,7 +34,6 @@ proc gdb_target_sim { } {
> }
> timeout {
> perror "Couldn't set target for simulator."
> - cleanup
> return -1
> }
> }
LGTM.
I guess with a recent Dejagnu it would produce an error to try to run it
then?
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: Remove use of dejagnu cleanup proc
2018-02-03 4:59 ` Simon Marchi
@ 2018-02-03 16:53 ` Andrew Burgess
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2018-02-03 16:53 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
* Simon Marchi <simon.marchi@polymtl.ca> [2018-02-02 23:59:07 -0500]:
> On 2018-02-02 07:56, Andrew Burgess wrote:
> > The 'cleanup' proc has been removed from dejagnu (Feb 15 2016). The
> > proc has not done anything useful since at least 2001 so removing
> > these calls should be harmless.
> >
> > gdb/testsuite/ChangeLog:
> >
> > * config/sid.exp (gdb_target_sid): Remove use of cleanup.
> > * config/sim.exp (gdb_target_sim): Remove use of cleanup.
> > ---
> > gdb/testsuite/ChangeLog | 5 +++++
> > gdb/testsuite/config/sid.exp | 2 --
> > gdb/testsuite/config/sim.exp | 1 -
> > 3 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp
> > index 36bd8611966..8ff0263b618 100644
> > --- a/gdb/testsuite/config/sid.exp
> > +++ b/gdb/testsuite/config/sid.exp
> > @@ -146,7 +146,6 @@ proc gdb_target_sid { } {
> > gdb_expect {
> > -re ".*\[Ee\]rror.*$gdb_prompt $" {
> > perror "Couldn't set target for remote simulator."
> > - cleanup
> > gdb_exit
> > }
> > -re "Remote debugging using.*$gdb_prompt" {
> > @@ -154,7 +153,6 @@ proc gdb_target_sid { } {
> > }
> > timeout {
> > perror "Couldn't set target for remote simulator."
> > - cleanup
> > gdb_exit
> > }
> > }
> > diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp
> > index 7170a259837..d9072febc6a 100644
> > --- a/gdb/testsuite/config/sim.exp
> > +++ b/gdb/testsuite/config/sim.exp
> > @@ -34,7 +34,6 @@ proc gdb_target_sim { } {
> > }
> > timeout {
> > perror "Couldn't set target for simulator."
> > - cleanup
> > return -1
> > }
> > }
>
> LGTM.
>
> I guess with a recent Dejagnu it would produce an error to try to run it
> then?
Well, all the uses are on error paths, so, you're fine unless you're
failing... then you crash rather than simply failing one test and
continuing.
I'll go ahead and push this in.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-03 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 12:56 [PATCH] gdb/testsuite: Remove use of dejagnu cleanup proc Andrew Burgess
2018-02-03 4:59 ` Simon Marchi
2018-02-03 16:53 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox