From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77994 invoked by alias); 5 Apr 2017 16:45:58 -0000 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 Received: (qmail 77980 invoked by uid 89); 5 Apr 2017 16:45:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 16:45:56 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30F9B61980 for ; Wed, 5 Apr 2017 16:45:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 30F9B61980 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 30F9B61980 Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 078C87A240; Wed, 5 Apr 2017 16:45:56 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches Subject: Re: [commit/obvious] Fix PR 21352: Command tsave does not support -r argument References: <20170405163129.24815-1-sergiodj@redhat.com> <8d200237-58fe-45c3-c0a6-2f15413a988b@redhat.com> Date: Wed, 05 Apr 2017 16:45:00 -0000 In-Reply-To: <8d200237-58fe-45c3-c0a6-2f15413a988b@redhat.com> (Pedro Alves's message of "Wed, 5 Apr 2017 17:34:06 +0100") Message-ID: <87bmsa9517.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00120.txt.bz2 On Wednesday, April 05 2017, Pedro Alves wrote: > On 04/05/2017 05:31 PM, Sergio Durigan Junior wrote: >> This is an obvious fix for PR 21352. The problem is that the argument >> parsing loop is not using an "else if" where it should, and therefore >> the '-r' option ends up unrecognized by GDB. > > We have a few tests under gdb.trace/ that exercise "tsave". Would it > be easy to augment some to exercise this? Yes, absolutely. I was thinking about doing that but decided not too. Anyway, here's what I checked in. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ >From 0ad9d8c73486e60c5a4963c1b7a0ea7063d69cd2 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 5 Apr 2017 12:43:52 -0400 Subject: [PATCH] PR 21352: Add testsuite for "tsave -r" command This commit adds a test for the fix of PR 21352. gdb/testsuite/ChangeLog: 2017-04-05 Sergio Durigan Junior PR gdb/21352 * gdb.trace/tsv.exp: Add test for "tsave -r". --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/tsv.exp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index eb543eb..83d6018 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-04-05 Sergio Durigan Junior + + PR gdb/21352 + * gdb.trace/tsv.exp: Add test for "tsave -r". + 2017-03-29 Jan Kratochvil * gdb.python/py-section-script.exp (sepdebug): New testcases. diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp index 9da4669..2b80c80 100644 --- a/gdb/testsuite/gdb.trace/tsv.exp +++ b/gdb/testsuite/gdb.trace/tsv.exp @@ -26,6 +26,10 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ } gdb_load $binfile +# PR gdb/21352: Command tsave does not support -r argument +gdb_test "tsave -r" "Argument required \\\(file in which to save trace data\\\)\." \ + "tsave command properly supports -r argument" + gdb_test "tvariable \$tvar1" \ "Trace state variable \\\$tvar1 created, with initial value 0." \ "create a trace state variable" -- 2.9.3