From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16494 invoked by alias); 3 Jun 2010 18:39:28 -0000 Received: (qmail 16480 invoked by uid 22791); 3 Jun 2010 18:39:27 -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 smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Jun 2010 18:39:19 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 7FA002A003; Thu, 3 Jun 2010 11:39:18 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id 77730C9B7E; Thu, 3 Jun 2010 11:39:18 -0700 (PDT) Message-ID: <4C07F6D6.8060809@vmware.com> Date: Thu, 03 Jun 2010 18:39:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Joel Brobecker CC: "gdb@sourceware.org" Subject: Re: gdb_test_no_output References: <4C07EB44.7010605@vmware.com> <20100603183605.GH20736@adacore.com> In-Reply-To: <20100603183605.GH20736@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00014.txt.bz2 Joel Brobecker wrote: >> An oft-used feature of gdb_test is that, if the message string is >> supplied but empty (""), no PASS/FAIL output is produced. This is >> used when you want to give a command to gdb without actually testing >> anything. > > It's very easy to implement the exact same behavior as gdb_test, but > are we certain that this is a valuable capability? Looking at the > documentation for that function, one can find: > > # MESSAGE is an optional message to be printed. If this is > # omitted, then the pass/fail messages use the command string as the > # message. (If this is the empty string, then sometimes we don't > # call pass or fail at all; I don't understand this at all.) > > The current implementation seems inconsistent; but also I don't think > that is really makes that much difference whether the test generates > a result or not. > > But if that's what people want... It used to be a frequently used "idiom" -- if you wanted to do a "next", for instance, just to set up for the next thing that you needed to test, you would say gdb_test "next" "" "" and it wouldn't add anything superfluous to the test output. I'm currently looking at replacing the regexp part of those usages with ".*", but the behavior in general is still useful, I think. Michael