From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31255 invoked by alias); 12 Jul 2009 18:25:06 -0000 Received: (qmail 31214 invoked by uid 22791); 12 Jul 2009 18:25:03 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jul 2009 18:24:54 +0000 Received: (qmail 27616 invoked from network); 12 Jul 2009 18:24:52 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Jul 2009 18:24:52 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Testing of reverse debug commands Date: Sun, 12 Jul 2009 18:25:00 -0000 User-Agent: KMail/1.9.10 Cc: Michael Snyder , Jan Kratochvil , Joel Brobecker , Hui Zhu References: <4A5930EE.3040201@vmware.com> <20090712142834.GA3355@host0.dyn.jankratochvil.net> <4A5A19FC.9050206@vmware.com> In-Reply-To: <4A5A19FC.9050206@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907121925.05187.pedro@codesourcery.com> 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: 2009-07/txt/msg00082.txt.bz2 On Sunday 12 July 2009 18:14:36, Michael Snyder wrote: > Jan Kratochvil wrote: > > On Sun, 12 Jul 2009 10:01:45 +0200, Joel Brobecker wrote: > >>> gdb_test "record" "" "Turn on process record" > >>> # FIXME: command ought to acknowledge, so we can test if it succeeded. > >> This is just a shot in the dark since I really don't have much time > >> to double-check this, but does gdb_test_multiple allow you to verify > >> that no output was generated? For some reason, I thought it did. > > > > This one works but not sure if it cannot have some problems: > > > > set cmd "set verbose 0" > > gdb_test $cmd "[string_to_regexp $cmd]" > > Hmm, ok, three people so far have responded with > work-arounds (thanks). > > Does that mean y'all lean toward NOT making the > commands generate some output of their own? We have many other commands that are silent on success, and we still test them. The important question is: would *users* find some output useful, not if the testsuite would. In this case, I've no real opinion. Assuming no extra verbosity, if you expect that *only* the gdb prompt is output, then you know that you had success. The issue with that hunk you pasted above, is that gdb_test "" eats any and all output before the prompt, so you can't use it, because you'd eat errors as well. Well, as they say: then don't do it. Do you agree with the point I raised about not being able to query the status of recording at any time? If we had such a way, I'd suggest checking if recording was in fact enabled with it, just like: http://sourceware.org/ml/gdb-patches/2009-06/msg00012.html -- Pedro Alves