From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26386 invoked by alias); 20 May 2010 16:24:54 -0000 Received: (qmail 26369 invoked by uid 22791); 20 May 2010 16:24:50 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 16:24:47 +0000 Received: (qmail 20330 invoked from network); 20 May 2010 16:24:45 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 May 2010 16:24:45 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [rfa] gdb.base/volatile.exp / varargs.exp: replace send_gdb with gdb_test Date: Thu, 20 May 2010 16:31:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-21-generic; KDE/4.3.2; x86_64; ; ) Cc: Joel Brobecker , Michael Snyder References: <4BF4497E.9040209@vmware.com> <20100520155010.GA3019@adacore.com> In-Reply-To: <20100520155010.GA3019@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005201724.42637.pedro@codesourcery.com> X-IsSubscribed: yes 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/msg00420.txt.bz2 On Thursday 20 May 2010 16:50:10, Joel Brobecker wrote: > > +gdb_test "set print sevenbit-strings" "" > > +gdb_test "set print address off" "" > > +gdb_test "set width 0" "" > > You actually don't need to specify the second argument if it's empty, > but I think it's good practice to do so, just to show that we do indeed > expect the command to produce no output. The fact that we cannot > currently verify that is a bit unfortunate, but at least the above > expresses it at the testsuite level... > You can anchor the output with gdb_test_multiple. This, for example, checks that a command produces no output other than the prompt: set cmd "..." set msg "..." set cmd_regex [string_to_regexp $cmd] gdb_test_multiple $cmd $msg { -re "^$cmd_regex\r\n$gdb_prompt $" { pass $msg } } something like this is used in several places in the testsuite. we could perhaps add a wrapper in gdb.exp. -- Pedro Alves