From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22618 invoked by alias); 26 May 2010 17:33:05 -0000 Received: (qmail 22604 invoked by uid 22791); 26 May 2010 17:33:04 -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; Wed, 26 May 2010 17:33:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 563612BABF8; Wed, 26 May 2010 13:32:58 -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 seFJ-gFEs9fa; Wed, 26 May 2010 13:32:58 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 053332BAB89; Wed, 26 May 2010 13:32:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4C59CF58FA; Wed, 26 May 2010 10:32:47 -0700 (PDT) Date: Wed, 26 May 2010 17:38:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: "gdb-patches@sourceware.org" Subject: Re: [RFA] gdb.base a*.exp b*.exp send_gdb vs gdb_test Message-ID: <20100526173247.GA3019@adacore.com> References: <4BFAEFF9.9050709@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BFAEFF9.9050709@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/msg00602.txt.bz2 > 2010-05-22 Michael Snyder > > * gdb.base/a2-run.exp: Replace send_gdb with gdb_test. > * gdb.base/all-bin.exp: Replace send_gdb with gdb_test. > * gdb.base/annota1.exp: Replace send_gdb with gdb_test. > * gdb.base/annota3.exp: Replace send_gdb with gdb_test. > * gdb.base/assign.exp: Replace send_gdb with gdb_test. > * gdb.base/attach.exp: Replace send_gdb with gdb_test. > * gdb.base/bitfields.exp: Replace send_gdb with gdb_test. > * gdb.base/bitfields2.exp: Replace send_gdb with gdb_test. > * gdb.base/bitops.exp: Replace send_gdb with gdb_test. One general question: > -gdb_expect { > +gdb_test_multiple "run" "run until main breakpoint" { > -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)+\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { > pass "run until main breakpoint" > } > - -re ".*$gdb_prompt$" { > - fail "run until main breakpoint" > - } > - timeout { > - fail "run until main breakpoint (timeout)" > - } > - } > +} It looks to me that this one could have been written using a simple gdb_test, since I don't see us using the output at all? > -send_gdb "next\n" > -gdb_expect { > - -re ".*$gdb_prompt$" { pass "go after array init line" } > - timeout { fail "go after array init line (timeout)" } > +gdb_test_multiple "next" "go after array init line" { > + -re "source .*annota1.c.*$gdb_prompt$" { > + pass "go after array init line" > + } > } Same for this one? In fact, starting from here, you suddendly started using gdb_test_multiple even when there was only one regexp used. I'm probably missing someting...? Is it something in the output that make it unsuitable for gdb_test? -- Joel