From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31672 invoked by alias); 18 Sep 2002 14:56:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31664 invoked from network); 18 Sep 2002 14:56:26 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 18 Sep 2002 14:56:26 -0000 Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 4089CB8831 for ; Wed, 18 Sep 2002 10:56:25 -0400 (EDT) Message-ID: <3D8893C9.5050209@redhat.com> Date: Wed, 18 Sep 2002 07:56:00 -0000 From: Fernando Nasser Organization: Red Hat Canada User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite: Fix rerun_to_main to allow restarting References: <20020914115139.N1574@cygbert.vinschen.de> <20020918111255.Y29920@cygbert.vinschen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00392.txt.bz2 It is not obvious at all, but I think it is correct. Please check it in. P.S.: I was thinking if the same message could come out of some erroneous condition (in which case we would be failing to detect some problem). In any case, we will have to accept it we we want to support a generic restart and we will have detected a malfunction that causes a message like that much before anyway. Corinna Vinschen wrote: > Hi, > > On Sat, Sep 14, 2002 at 11:51:39AM +0200, Corinna Vinschen wrote: > >>the following patch fixes an error in the testsuite lib. In lib/gdb.exp, >>the proc rerun_to_main() doesn't take into account, that some targets >>never actually exit, but instead are programatically trapped in some >>_exit function. >>[...] > > > may I treat this as obvious patch? I'm not sure if that still counts > as one... > > Corinna > > >> * lib/gdb.exp (rerun_to_main): Allow restarting application. >> * gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate. >> >>Index: lib/gdb.exp >>=================================================================== >>RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v >>retrieving revision 1.26 >>diff -u -p -r1.26 gdb.exp >>--- lib/gdb.exp 13 Sep 2002 17:20:11 -0000 1.26 >>+++ lib/gdb.exp 14 Sep 2002 09:44:44 -0000 >>@@ -1685,6 +1685,10 @@ proc rerun_to_main {} { >> } else { >> send_gdb "run\n" >> gdb_expect { >>+ -re "The program .* has been started already.*y or n. $" { >>+ send_gdb "y\n" >>+ exp_continue >>+ } >> -re "Starting program.*$gdb_prompt $"\ >> {pass "rerun to main" ; return 0} >> -re "$gdb_prompt $"\ >>Index: gdb.base/ena-dis-br.exp >>=================================================================== >>RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ena-dis-br.exp,v >>retrieving revision 1.2 >>diff -u -p -r1.2 ena-dis-br.exp >>--- gdb.base/ena-dis-br.exp 6 Mar 2001 08:21:50 -0000 1.2 >>+++ gdb.base/ena-dis-br.exp 14 Sep 2002 09:44:44 -0000 >>@@ -38,30 +38,6 @@ if { [gdb_compile "${srcdir}/${subdir}/ >> gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." >> } >> >>-proc rerun_to_main {} { >>- global gdb_prompt >>- >>- if [target_info exists use_gdb_stub] { >>- gdb_run_cmd >>- gdb_expect { >>- -re ".*Breakpoint .*main .*$gdb_prompt $"\ >>- {pass "rerun to main" ; return 0} >>- -re "$gdb_prompt $"\ >>- {fail "rerun to main" ; return 0} >>- timeout {fail "(timeout) rerun to main" ; return 0} >>- } >>- } else { >>- send_gdb "run\n" >>- gdb_expect { >>- -re "Starting program.*$gdb_prompt $"\ >>- {pass "rerun to main" ; return 0} >>- -re "$gdb_prompt $"\ >>- {fail "rerun to main" ; return 0} >>- timeout {fail "(timeout) rerun to main" ; return 0} >>- } >>- } >>-} >>- >> gdb_exit >> gdb_start >> gdb_reinitialize_dir $srcdir/$subdir > > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9