* [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit @ 2013-10-09 8:58 Anton Kolesov 2013-10-09 11:28 ` Pedro Alves 0 siblings, 1 reply; 6+ messages in thread From: Anton Kolesov @ 2013-10-09 8:58 UTC (permalink / raw) To: gdb-patches; +Cc: Jeremy.bennett From: Anton Kolesov <akolesov@synopsys.com> 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-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. --- gdb/testsuite/gdb.base/bang.exp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp index 6fd3a59..4c5c2e6 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.8.4.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit 2013-10-09 8:58 [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit Anton Kolesov @ 2013-10-09 11:28 ` Pedro Alves 2013-10-25 10:04 ` Anton Kolesov 0 siblings, 1 reply; 6+ messages in thread From: Pedro Alves @ 2013-10-09 11:28 UTC (permalink / raw) To: Anton Kolesov; +Cc: gdb-patches, Jeremy.bennett 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. -- Pedro Alves ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit 2013-10-09 11:28 ` Pedro Alves @ 2013-10-25 10:04 ` Anton Kolesov 2013-10-25 12:22 ` Pedro Alves 0 siblings, 1 reply; 6+ messages in thread From: Anton Kolesov @ 2013-10-25 10:04 UTC (permalink / raw) To: gdb-patches; +Cc: Jeremy.bennett [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 804 bytes --] > -----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? Anton Kolesov > > -- > Pedro Alves \x16º&Öéj×!zÊÞ¶êç×NºóIb²Ö«r\x18\x1dnr\x17¬ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit 2013-10-25 10:04 ` Anton Kolesov @ 2013-10-25 12:22 ` Pedro Alves 2013-10-25 12:36 ` Pedro Alves 0 siblings, 1 reply; 6+ messages in thread From: Pedro Alves @ 2013-10-25 12:22 UTC (permalink / raw) To: Anton Kolesov; +Cc: gdb-patches, Jeremy.bennett 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. Thanks, -- Pedro Alves ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit 2013-10-25 12:22 ` Pedro Alves @ 2013-10-25 12:36 ` Pedro Alves 2013-10-25 15:27 ` Anton Kolesov 0 siblings, 1 reply; 6+ messages in thread From: Pedro Alves @ 2013-10-25 12:36 UTC (permalink / raw) To: Anton Kolesov; +Cc: gdb-patches, Jeremy.bennett 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit 2013-10-25 12:36 ` Pedro Alves @ 2013-10-25 15:27 ` Anton Kolesov 0 siblings, 0 replies; 6+ messages in thread From: Anton Kolesov @ 2013-10-25 15:27 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb-patches, Jeremy.bennett [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1041 bytes --] > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: 25 October 2013 16:36 > 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 > > > 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.) Thanks. I will talk to management and legal department to sort out copyright issues. I will pay greater attention to those details. Anton Kolesov \x16º&Öéj×!zÊÞ¶êç×NºóÉb²Ö«r\x18\x1dnr\x17¬ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-25 15:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-09 8:58 [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit Anton Kolesov 2013-10-09 11:28 ` Pedro Alves 2013-10-25 10:04 ` Anton Kolesov 2013-10-25 12:22 ` Pedro Alves 2013-10-25 12:36 ` Pedro Alves 2013-10-25 15:27 ` Anton Kolesov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox