From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28351 invoked by alias); 22 Jan 2015 12:46:19 -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 28330 invoked by uid 89); 22 Jan 2015 12:46:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 22 Jan 2015 12:46:13 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0MCk8lE005594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Jan 2015 07:46:08 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0MCk6og006930; Thu, 22 Jan 2015 07:46:07 -0500 Message-ID: <54C0F10E.60402@redhat.com> Date: Thu, 22 Jan 2015 12:46:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Pierre Muller CC: "'gdb-patches'" Subject: Re: [RFA PATCH 3/3] Testcase for pascal/17815 References: <54ae4586.01e3440a.7b06.fffff844SMTPIN_ADDED_BROKEN@mx.google.com> <54AE605A.8050308@redhat.com> <54ae7f9f.c323460a.36ed.ffffff30SMTPIN_ADDED_BROKEN@mx.google.com> <54AE8914.4010507@redhat.com> <54ae911b.85e3440a.1d96.5ffdSMTPIN_ADDED_BROKEN@mx.google.com> <54AFB2E5.5080307@redhat.com> <54afff6b.ee8d440a.16ee.ffffb424SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <54afff6b.ee8d440a.16ee.ffffb424SMTPIN_ADDED_BROKEN@mx.google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00589.txt.bz2 Thanks for adding the test case. On 01/09/2015 04:18 PM, Pierre Muller wrote: > This adds the testcase for pascal/17815 bug report. > > > gdb/testsuite/Changelog entry: > > 2015-01-09 Pierre Muller > > gdb.pascal/gdb17815.pas: New file. > gdb.pascal/gdb17815.exp: New file. Missing '*'. Can you please pick a more descriptive name for the file? One that suggests what's being tested, rather than a bug number is ideal. E.g., gdb.pascal/case-insensitive.{exp|pas}. > +load_lib "pascal.exp" > + > +standard_testfile .pas > + > +if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" > executable [list debug class]] != "" } { > + untested $testfile.exp > + return -1 > +} > + > +clean_restart ${testfile} > +set bp_location [gdb_get_line_number "set breakpoint here"] > + > +if { [gdb_breakpoint ${srcfile}:${bp_location}] } { > + pass "setting breakpoint" > +} > + > +# Verify that "start" lands inside the right procedure. > +if { [gdb_start_cmd] < 0 } { > + untested start > + return -1 > +} > + > +gdb_test "" ".* at .*${srcfile}.*" "start" > +gdb_test "continue" "" I won't object to this, given that it seems like all pascal tests do it, but I'll note that it's best to avoid gdb_start_cmd unless we're really testing the "start" command, as otherwise the test won't run against gdbserver (try --target_board=native-gdbserver). Doesn't runto_main work? > +# We are now inside CHECK method Could you add a period at end of sentences? Here and throughout. > +gdb_test "p X" " = 67" > +gdb_test "p B.X" " = -1" > +# As A is global, we can also check it global value ^^ Should be "its". Or, "check its value"? What's a _global_ value? > +gdb_test "p A.X" " = 67" > +gdb_test "p Y" " = 33" > +gdb_test "p Y" " = 33" Duplicate test here. Please try the recipe at: https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_messages_are_unique Thanks, Pedro Alves