public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
@ 2015-07-09 16:54 Pierre Langlois
  2015-07-15 10:02 ` Pierre Langlois
  2015-07-15 11:55 ` Yao Qi
  0 siblings, 2 replies; 4+ messages in thread
From: Pierre Langlois @ 2015-07-09 16:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pierre Langlois

Hi all,

Tracepoints and range stepping are independent features.  This patch
skips the gdb.trace/range-stepping.exp test case if the target does not
support range stepping.

Thanks,
Pierre

gdb/testsuite/ChangeLog:

	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move
	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
	... to here.
	* gdb.trace/range-stepping.exp: Check that the target supports
	range stepping.
---
 gdb/testsuite/gdb.base/range-stepping.exp    | 21 ---------------------
 gdb/testsuite/gdb.trace/range-stepping.exp   |  5 +++++
 gdb/testsuite/lib/range-stepping-support.exp | 21 +++++++++++++++++++++
 3 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
index 3b8db7b..2ff371d 100644
--- a/gdb/testsuite/gdb.base/range-stepping.exp
+++ b/gdb/testsuite/gdb.base/range-stepping.exp
@@ -27,27 +27,6 @@ if ![runto_main] {
     return -1
 }
 
-# Check whether range stepping is supported by the target.
-
-proc gdb_range_stepping_enabled { } {
-    global gdb_prompt
-
-    set command "set range-stepping on"
-    set message "probe range-stepping support"
-    gdb_test_multiple $command $message {
-        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
-	    pass $message
-	    return 0
-	}
-        -re "^$command\r\n$gdb_prompt $" {
-	    pass $message
-	    return 1
-	}
-    }
-
-    return 0
-}
-
 if ![gdb_range_stepping_enabled] {
     unsupported "range stepping not supported by the target"
     return -1
diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
index e711072..dfc16d5 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.exp
+++ b/gdb/testsuite/gdb.trace/range-stepping.exp
@@ -34,6 +34,11 @@ if ![gdb_target_supports_trace] {
     return -1
 }
 
+if ![gdb_range_stepping_enabled] {
+    unsupported "range stepping not supported by the target"
+    return -1
+}
+
 # Check that range stepping works well with tracepoints.
 
 proc range_stepping_with_tracepoint { type } {
diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp
index 986216e..d6c0e85 100644
--- a/gdb/testsuite/lib/range-stepping-support.exp
+++ b/gdb/testsuite/lib/range-stepping-support.exp
@@ -52,3 +52,24 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
     gdb_test_no_output "set debug remote 0" ""
     return $ret
 }
+
+# Check whether range stepping is supported by the target.
+
+proc gdb_range_stepping_enabled { } {
+    global gdb_prompt
+
+    set command "set range-stepping on"
+    set message "probe range-stepping support"
+    gdb_test_multiple $command $message {
+        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
+	    pass $message
+	    return 0
+	}
+        -re "^$command\r\n$gdb_prompt $" {
+	    pass $message
+	    return 1
+	}
+    }
+
+    return 0
+}
-- 
2.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
  2015-07-09 16:54 [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported Pierre Langlois
@ 2015-07-15 10:02 ` Pierre Langlois
  2015-07-15 11:55 ` Yao Qi
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre Langlois @ 2015-07-15 10:02 UTC (permalink / raw)
  To: gdb-patches; +Cc: pierre.langlois

On 09/07/15 17:54, Pierre Langlois wrote:
> Hi all,
> 
> Tracepoints and range stepping are independent features.  This patch
> skips the gdb.trace/range-stepping.exp test case if the target does not
> support range stepping.
> 
> Thanks,
> Pierre
> 
> gdb/testsuite/ChangeLog:
> 
> 	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move
> 	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
> 	... to here.
> 	* gdb.trace/range-stepping.exp: Check that the target supports
> 	range stepping.
> ---
>  gdb/testsuite/gdb.base/range-stepping.exp    | 21 ---------------------
>  gdb/testsuite/gdb.trace/range-stepping.exp   |  5 +++++
>  gdb/testsuite/lib/range-stepping-support.exp | 21 +++++++++++++++++++++
>  3 files changed, 26 insertions(+), 21 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
> index 3b8db7b..2ff371d 100644
> --- a/gdb/testsuite/gdb.base/range-stepping.exp
> +++ b/gdb/testsuite/gdb.base/range-stepping.exp
> @@ -27,27 +27,6 @@ if ![runto_main] {
>      return -1
>  }
>  
> -# Check whether range stepping is supported by the target.
> -
> -proc gdb_range_stepping_enabled { } {
> -    global gdb_prompt
> -
> -    set command "set range-stepping on"
> -    set message "probe range-stepping support"
> -    gdb_test_multiple $command $message {
> -        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
> -	    pass $message
> -	    return 0
> -	}
> -        -re "^$command\r\n$gdb_prompt $" {
> -	    pass $message
> -	    return 1
> -	}
> -    }
> -
> -    return 0
> -}
> -
>  if ![gdb_range_stepping_enabled] {
>      unsupported "range stepping not supported by the target"
>      return -1
> diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
> index e711072..dfc16d5 100644
> --- a/gdb/testsuite/gdb.trace/range-stepping.exp
> +++ b/gdb/testsuite/gdb.trace/range-stepping.exp
> @@ -34,6 +34,11 @@ if ![gdb_target_supports_trace] {
>      return -1
>  }
>  
> +if ![gdb_range_stepping_enabled] {
> +    unsupported "range stepping not supported by the target"
> +    return -1
> +}
> +
>  # Check that range stepping works well with tracepoints.
>  
>  proc range_stepping_with_tracepoint { type } {
> diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp
> index 986216e..d6c0e85 100644
> --- a/gdb/testsuite/lib/range-stepping-support.exp
> +++ b/gdb/testsuite/lib/range-stepping-support.exp
> @@ -52,3 +52,24 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
>      gdb_test_no_output "set debug remote 0" ""
>      return $ret
>  }
> +
> +# Check whether range stepping is supported by the target.
> +
> +proc gdb_range_stepping_enabled { } {
> +    global gdb_prompt
> +
> +    set command "set range-stepping on"
> +    set message "probe range-stepping support"
> +    gdb_test_multiple $command $message {
> +        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
> +	    pass $message
> +	    return 0
> +	}
> +        -re "^$command\r\n$gdb_prompt $" {
> +	    pass $message
> +	    return 1
> +	}
> +    }
> +
> +    return 0
> +}
> 

Ping.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
  2015-07-09 16:54 [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported Pierre Langlois
  2015-07-15 10:02 ` Pierre Langlois
@ 2015-07-15 11:55 ` Yao Qi
  2015-07-15 13:35   ` Pierre Langlois
  1 sibling, 1 reply; 4+ messages in thread
From: Yao Qi @ 2015-07-15 11:55 UTC (permalink / raw)
  To: Pierre Langlois; +Cc: gdb-patches

Pierre Langlois <pierre.langlois@arm.com> writes:

A nit on changelog entry,

> 	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move
> 	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
> 	... to here.

We write changelog for such moving like this,

	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): 
        Move it to ...
	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
	... here.

> 	* gdb.trace/range-stepping.exp: Check that the target supports
> 	range stepping.

The patch is OK.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
  2015-07-15 11:55 ` Yao Qi
@ 2015-07-15 13:35   ` Pierre Langlois
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Langlois @ 2015-07-15 13:35 UTC (permalink / raw)
  To: Yao Qi; +Cc: pierre.langlois, gdb-patches

On 15/07/15 12:55, Yao Qi wrote:
> Pierre Langlois <pierre.langlois@arm.com> writes:
> 
> A nit on changelog entry,
> 
>> 	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move
>> 	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
>> 	... to here.
> 
> We write changelog for such moving like this,
> 
> 	* gdb.base/range-stepping.exp (gdb_range_stepping_enabled): 
>         Move it to ...
> 	* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
> 	... here.
> 

Fixed.

>> 	* gdb.trace/range-stepping.exp: Check that the target supports
>> 	range stepping.
> 
> The patch is OK.
> 

Thanks, I've pushed it in with the correct ChangeLog.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-15 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 16:54 [PATCH] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported Pierre Langlois
2015-07-15 10:02 ` Pierre Langlois
2015-07-15 11:55 ` Yao Qi
2015-07-15 13:35   ` Pierre Langlois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).