This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit


On 10/25/2013 01:22 PM, Pedro Alves wrote:
> On 10/25/2013 11:04 AM, Anton Kolesov wrote:
>>> -----Original Message-----
>>> From: Pedro Alves [mailto:palves@redhat.com]
>>> Sent: 09 October 2013 15:29
>>> To: Anton Kolesov
>>> Cc: gdb-patches@sourceware.org; Jeremy.bennett@embecosm.com
>>> Subject: Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs
>>> without exit
>>>
>>> On 10/09/2013 09:58 AM, Anton Kolesov wrote:
>>>
>>>> 2013-10-08  Anton Kolesov <Anton.Kolesov@synopsys.com>
>>>>
>>>> 	* gdb.base/bang.exp: Use gdb_continue_to_end to properly
>>> support
>>>> 	remote stubs where exit() behaviour is unreliable.
>>>
>>> OK, thanks.
>>
>> I don't have a write access to GDB repository. And I don't think I have a required approval. Can someone please submit this patch, since it has already been approved? 
> 
> I'm not sure I've asked this before (apologies if I have),
> Do you know the status of your copyright assignment?
> I notice now that unfortunately, Synopsys doesn't seem to have a
> copyright assignment in place.  I see there used to be one, but it
> has expired already, and in any case it only assigned changes done
> by someone else.
> 
> I'll push this patch in, as it's small and trivial enough to
> go in without assignment, but that's as far as we're allowed to go.
> We'll need to sort out the copyright assignment to put in any
> other patch from now on.

Done, as below.  Thanks for the patch.

Note I fixed a spurious whitespace:
 $ git am /tmp/mbox
 Applying: testsuite: Fix gdb.base/bang.exp for remote stubs without exit
 /home/pedro/gdb/mygit/src/.git/rebase-apply/patch:23: trailing whitespace.
 gdb_continue_to_end "" continue 1 
 warning: 1 line adds whitespace errors.

And also fixed ChangeLog entry formatting -- should be two spaces
between name and email.

("tiny change" is just how we mark patches that don't add up
to something legally significant.)

-------
>From d4703eb2949c3296107cad41f925519730f16927 Mon Sep 17 00:00:00 2001
From: Anton Kolesov <akolesov@synopsys.com>
Date: Wed, 9 Oct 2013 12:58:14 +0400
Subject: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without
 exit

Some remote stubs do not have a proper exit() function implementation.
gdb.base/bang.exp was failing on those targets due to timeout.  With
this patch bang.exp uses already defined library procedures to handle
this situation gracefully without breaking native targets.

Tested with x86_64 (unix, native-gdbserver) and with arc-*-elf32.

gdb/testsuite/ChangeLog:

2013-10-25  Anton Kolesov  <Anton.Kolesov@synopsys.com>  (tiny change)

	* gdb.base/bang.exp: Use gdb_continue_to_end to properly support
	remote stubs where exit() behaviour is unreliable.
---
 gdb/testsuite/ChangeLog         |  5 +++++
 gdb/testsuite/gdb.base/bang.exp | 11 ++---------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0c1dbef..ca0c7af 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-25  Anton Kolesov  <Anton.Kolesov@synopsys.com>  (tiny change)
+
+	* gdb.base/bang.exp: Use gdb_continue_to_end to properly support
+	remote stubs where exit() behaviour is unreliable.
+
 2013-10-25  Pedro Alves  <palves@redhat.com>
 
 	* gdb.cp/m-static.exp: Adjust expected output of printing a
diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp
index 6fd3a59..e03c718 100644
--- a/gdb/testsuite/gdb.base/bang.exp
+++ b/gdb/testsuite/gdb.base/bang.exp
@@ -26,12 +26,5 @@ if {[prepare_for_testing $testfile.exp ${testfile}! $srcfile \
 
 # Verify that we can run the program and that it terminates normally.
 
-gdb_run_cmd
-gdb_expect {
-    -re ".*$inferior_exited_re normally.*$gdb_prompt $" {
-        pass "run program"
-    }
-    timeout {
-	fail "run program (timeout)"
-    }
-}
+runto_main
+gdb_continue_to_end "" continue 1
-- 
1.7.11.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]