From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20740 invoked by alias); 20 May 2010 21:07:35 -0000 Received: (qmail 20724 invoked by uid 22791); 20 May 2010 21:07:34 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 21:07:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E70EE2BB006; Thu, 20 May 2010 17:07:20 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7M-W2xLvBhZW; Thu, 20 May 2010 17:07:20 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 833702BAFFF; Thu, 20 May 2010 17:07:20 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 84170F58FA; Thu, 20 May 2010 14:07:18 -0700 (PDT) Date: Thu, 20 May 2010 21:07:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: "gdb-patches@sourceware.org" Subject: Re: [resubmit] gdb.base, r*.exp thru w*.exp Message-ID: <20100520210718.GF3019@adacore.com> References: <4BF59BBB.8020603@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BF59BBB.8020603@vmware.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00447.txt.bz2 On Thu, May 20, 2010 at 01:29:47PM -0700, Michael Snyder wrote: > Incorporating suggestions and changes, including Joel's new function. > > 2010-05-20 Michael Snyder > > * gdb.base/relational.exp: Replace send_gdb with gdb_test. > * gdb.base/relocate.exp: Replace send_gdb with gdb_test. > * gdb.base/return.exp: Replace send_gdb with gdb_test. > * gdb.base/return2.exp: Replace send_gdb with gdb_test. > * gdb.base/sepdebug.exp: Replace send_gdb with gdb_test. > * gdb.base/setvar.exp: Replace send_gdb with gdb_test. > * gdb.base/shlib-call.exp: Replace send_gdb with gdb_test. > * gdb.base/shreloc.exp: Replace send_gdb with gdb_test. > * gdb.base/sigall.exp: Replace send_gdb with gdb_test. > * gdb.base/sigbpt.exp: Replace send_gdb with gdb_test. > * gdb.base/signull.exp: Replace send_gdb with gdb_test. > * gdb.base/so-impl-ld.exp:Replace send_gdb with gdb_test. > * gdb.base/varargs.exp: Replace send_gdb with gdb_test. > * gdb.base/volatile.exp: Replace send_gdb with gdb_test. > * gdb.base/watch_thread_num.exp: Replace send_gdb with gdb_test. > * gdb.base/watchpoint.exp: Replace send_gdb with gdb_test. > * gdb.base/whatis.exp: Replace send_gdb with gdb_test. Looks good overall. It's a long patch, so I only skimmed it. Just a couple of comments... > -set name "set catch vfork, never expected to trigger" > -send_gdb "catch vfork\n" > - > # If we are on HP-UX 10.20, we expect an error message to be > # printed if we type "catch vfork" at the gdb gdb_prompt. This is > # because on HP-UX 10.20, we cannot catch vfork events. > > -if [istarget "hppa*-hp-hpux10.20"] then { > - gdb_expect { > - -re "Catch of vfork events not supported on HP-UX 10.20..*$gdb_prompt $" > - {pass $name} > - -re "$gdb_prompt $" > - {fail $name} > - timeout {fail "(timeout) $name"} > +set name "set catch vfork, never expected to trigger" > +gdb_test_multiple "catch vfork" $name { > + -re "Catch of vfork events not supported on HP-UX 10.20.*" { > + pass $name > } > -} else { > - gdb_expect { > - -re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $" > - {pass $name} > - -re "Catch of vfork not yet implemented.*$gdb_prompt $" > - {pass $name} > - -re "$gdb_prompt $" > - {fail $name} > - timeout {fail "(timeout) $name"} > + -re "Catchpoint \[0-9\]* .vfork.*$gdb_prompt $" { > + pass $name > + } > + -re "Catch of vfork not yet implemented.*$gdb_prompt $" { > + pass $name > } > } You slightly changed the implementation, but I think that in practice this is going to be the same, so I'm OK with that. > +gdb_test "break 999" "No line 999 in file .*" \ > + pass "break on non-existent source line" ^^^^ ??? > +gdb_test_multiple "break $bp_location1" \ > + "set to-be-silent break bp_location1" { > + -re "Breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $" { > + pass "set to-be-silent break bp_location1" > + } How about using test_gdb in this case? -- Joel