diff mbox

[3/3] Disable exec-dependent follow fork tests for remote

Message ID 1432320931-1550-4-git-send-email-donb@codesourcery.com
State New
Headers show

Commit Message

Don Breazeal May 22, 2015, 6:55 p.m. UTC
The native-extended-gdbserver target now supports fork events and
follow fork, but it does not yet support exec events.  Some of the
tests in gdb.base/foll-vfork.exp depend on exec events.  This patch
disables those tests for gdbserver targets.  We can re-enable these
once the exec event support goes in.

OK?

--Don


gdb/testsuite/
2015-05-22  Don Breazeal  <donb@codesourcery.com>

	* gdb.base/foll-vfork.exp (main): Disable exec-dependent
	tests for remote targets by checking is_target_gdbserver.

---
 gdb/testsuite/gdb.base/foll-vfork.exp | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

Comments

Pedro Alves May 23, 2015, 12:11 p.m. UTC | #1
On 05/22/2015 07:55 PM, Don Breazeal wrote:
> The native-extended-gdbserver target now supports fork events and
> follow fork, but it does not yet support exec events.  Some of the
> tests in gdb.base/foll-vfork.exp depend on exec events.  This patch
> disables those tests for gdbserver targets.  We can re-enable these
> once the exec event support goes in.
> 
> OK?

Pedantically, I think this should check gdb_is_target_remote instead.
We lack support for exec events in the RSP, so this would fail
for any remote protocol stub, not just our gdbserver.

> 
> --Don
> 
> 
> gdb/testsuite/
> 2015-05-22  Don Breazeal  <donb@codesourcery.com>
> 
> 	* gdb.base/foll-vfork.exp (main): Disable exec-dependent
> 	tests for remote targets by checking is_target_gdbserver.
> 
> ---
>  gdb/testsuite/gdb.base/foll-vfork.exp | 28 ++++++++++++++++------------
>  1 file changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
> index 78c5cc8..26d7afd 100644
> --- a/gdb/testsuite/gdb.base/foll-vfork.exp
> +++ b/gdb/testsuite/gdb.base/foll-vfork.exp
> @@ -524,18 +524,22 @@ with_test_prefix "check vfork support" {
>      check_vfork_catchpoints
>  }
>  
> -# Follow parent and follow child vfork tests with a child that execs.
> -with_test_prefix "exec" {
> -    # These are tests of gdb's ability to follow the parent of a Unix
> -    # vfork system call.  The child will subsequently call a variant
> -    # of the Unix exec system call.
> -    do_vfork_and_follow_parent_tests
> -
> -    # These are tests of gdb's ability to follow the child of a Unix
> -    # vfork system call.  The child will subsequently call a variant
> -    # of a Unix exec system call.
> -    #
> -    do_vfork_and_follow_child_tests_exec
> +if { ![target_is_gdbserver] } {
> +    # Follow parent and follow child vfork tests with a child that execs.
> +    with_test_prefix "exec" {
> +	# These are tests of gdb's ability to follow the parent of a Unix
> +	# vfork system call.  The child will subsequently call a variant
> +	# of the Unix exec system call.
> +	do_vfork_and_follow_parent_tests
> +
> +	# These are tests of gdb's ability to follow the child of a Unix
> +	# vfork system call.  The child will subsequently call a variant
> +	# of a Unix exec system call.
> +	#
> +	do_vfork_and_follow_child_tests_exec
> +    }
> +} else {
> +    untested "vfork with exec: exec events not supported for remote" 

'git am' caught that there's a spurious space at the end of this line.
Please remove it.

OK with these changes.

>  }
>  
>  # Switch to test the case of the child exiting.  We can't use
> 

Thanks!
Pedro Alves May 23, 2015, 12:14 p.m. UTC | #2
On 05/23/2015 01:11 PM, Pedro Alves wrote:
> On 05/22/2015 07:55 PM, Don Breazeal wrote:
>> The native-extended-gdbserver target now supports fork events and
>> follow fork, but it does not yet support exec events.  Some of the
>> tests in gdb.base/foll-vfork.exp depend on exec events.  This patch
>> disables those tests for gdbserver targets.  We can re-enable these
>> once the exec event support goes in.
>>
>> OK?
> 
> Pedantically, I think this should check gdb_is_target_remote instead.
> We lack support for exec events in the RSP, so this would fail
> for any remote protocol stub, not just our gdbserver.
> 
>>
>> --Don
>>
>>
>> gdb/testsuite/
>> 2015-05-22  Don Breazeal  <donb@codesourcery.com>
>>
>> 	* gdb.base/foll-vfork.exp (main): Disable exec-dependent
>> 	tests for remote targets by checking is_target_gdbserver.
>>
>> ---
>>  gdb/testsuite/gdb.base/foll-vfork.exp | 28 ++++++++++++++++------------
>>  1 file changed, 16 insertions(+), 12 deletions(-)
>>
>> diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
>> index 78c5cc8..26d7afd 100644
>> --- a/gdb/testsuite/gdb.base/foll-vfork.exp
>> +++ b/gdb/testsuite/gdb.base/foll-vfork.exp
>> @@ -524,18 +524,22 @@ with_test_prefix "check vfork support" {
>>      check_vfork_catchpoints
>>  }
>>  
>> -# Follow parent and follow child vfork tests with a child that execs.
>> -with_test_prefix "exec" {
>> -    # These are tests of gdb's ability to follow the parent of a Unix
>> -    # vfork system call.  The child will subsequently call a variant
>> -    # of the Unix exec system call.
>> -    do_vfork_and_follow_parent_tests
>> -
>> -    # These are tests of gdb's ability to follow the child of a Unix
>> -    # vfork system call.  The child will subsequently call a variant
>> -    # of a Unix exec system call.
>> -    #
>> -    do_vfork_and_follow_child_tests_exec
>> +if { ![target_is_gdbserver] } {
>> +    # Follow parent and follow child vfork tests with a child that execs.
>> +    with_test_prefix "exec" {
>> +	# These are tests of gdb's ability to follow the parent of a Unix
>> +	# vfork system call.  The child will subsequently call a variant
>> +	# of the Unix exec system call.
>> +	do_vfork_and_follow_parent_tests
>> +
>> +	# These are tests of gdb's ability to follow the child of a Unix
>> +	# vfork system call.  The child will subsequently call a variant
>> +	# of a Unix exec system call.
>> +	#
>> +	do_vfork_and_follow_child_tests_exec
>> +    }
>> +} else {
>> +    untested "vfork with exec: exec events not supported for remote" 
> 
> 'git am' caught that there's a spurious space at the end of this line.
> Please remove it.
> 
> OK with these changes.

Oh, BTW, still from the pedantic department, that should probably
be an "unsupported" call instead of "untested".

> 
>>  }
>>  
>>  # Switch to test the case of the child exiting.  We can't use
>>
> 
> Thanks!
> 


Thanks,
Pedro Alves
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
index 78c5cc8..26d7afd 100644
--- a/gdb/testsuite/gdb.base/foll-vfork.exp
+++ b/gdb/testsuite/gdb.base/foll-vfork.exp
@@ -524,18 +524,22 @@  with_test_prefix "check vfork support" {
     check_vfork_catchpoints
 }
 
-# Follow parent and follow child vfork tests with a child that execs.
-with_test_prefix "exec" {
-    # These are tests of gdb's ability to follow the parent of a Unix
-    # vfork system call.  The child will subsequently call a variant
-    # of the Unix exec system call.
-    do_vfork_and_follow_parent_tests
-
-    # These are tests of gdb's ability to follow the child of a Unix
-    # vfork system call.  The child will subsequently call a variant
-    # of a Unix exec system call.
-    #
-    do_vfork_and_follow_child_tests_exec
+if { ![target_is_gdbserver] } {
+    # Follow parent and follow child vfork tests with a child that execs.
+    with_test_prefix "exec" {
+	# These are tests of gdb's ability to follow the parent of a Unix
+	# vfork system call.  The child will subsequently call a variant
+	# of the Unix exec system call.
+	do_vfork_and_follow_parent_tests
+
+	# These are tests of gdb's ability to follow the child of a Unix
+	# vfork system call.  The child will subsequently call a variant
+	# of a Unix exec system call.
+	#
+	do_vfork_and_follow_child_tests_exec
+    }
+} else {
+    untested "vfork with exec: exec events not supported for remote" 
 }
 
 # Switch to test the case of the child exiting.  We can't use