From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by sourceware.org (Postfix) with ESMTPS id A4A4C3858C2D for ; Fri, 5 Aug 2022 22:00:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A4A4C3858C2D Received: by mail-vs1-xe29.google.com with SMTP id q15so3803029vsr.0 for ; Fri, 05 Aug 2022 15:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc; bh=rq4qH3YIOS6ukswrvGiTNrPQ1sncMnp7/7q8HWT0Gpo=; b=MEbQiZ5vB1oatIzF8mgxFBHIQm9+T2Pf+f3fp7xlc+Dp+hukzYkLw0vdzUdykBlK8B 3Tw5fh7CMB4eGfQEmtAS6YfwEu84np5gWWaRd6hZnVfubgePiLWw8QSC5eGhsfHYNkB+ NWlWrGMz8d2iTY1GJX8Bna/3ZqbV5uvmzwirhXq7WGu5zYsRBITx18nV8f+QzdtVd6Ki 8GwdiboMMdDb8OaV9iDYUHAX6cdjprDoUwVDAFRc6qmzgxfkGyoo4+mB+mxkMvWZAmtc 00fkn63DrpM956kHNthvF+XzMWsjmKOg8EsG93sbdG0FvkQsslvrlby+5EgSOzefkNl0 fs8Q== X-Gm-Message-State: ACgBeo2PeYdMZBt6PNjt07LjaJ5ptaEkXtl3xnHObCgFcnXMBrRz/Am0 hyfVK7X8TkLCNXMMED8bVTRZWA== X-Google-Smtp-Source: AA6agR5uWPGpqZpVZD9AOPdZs0NSySAB2d7BY/QBzIwYqq1uf6wJmtjvhmyQePFsBUAPrZuR//kuKw== X-Received: by 2002:a67:ed0e:0:b0:383:d9c1:1ff5 with SMTP id l14-20020a67ed0e000000b00383d9c11ff5mr3893151vsp.51.1659736845944; Fri, 05 Aug 2022 15:00:45 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:f679:ad12:bfc5:82b1]) by smtp.gmail.com with ESMTPSA id 2-20020a1f1602000000b0037613541b27sm3834196vkw.39.2022.08.05.15.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 15:00:44 -0700 (PDT) References: <20220805004648.111358-1-thiago.bauermann@linaro.org> <20220805004648.111358-3-thiago.bauermann@linaro.org> User-agent: mu4e 1.6.11; emacs 28.1 From: Thiago Jung Bauermann To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 2/2] gdb/testsuite: Add test for AArch64 Scalable Vector Extension Date: Fri, 05 Aug 2022 21:57:23 +0000 In-reply-to: Message-ID: <87o7wynyet.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 22:00:48 -0000 Hello Luis, Luis Machado writes: > Hi, > > Sorry I didn't reply to the previous v1 discussion. See notes below. No problem. Thank you for quickly reviewing the patches! > On 8/5/22 01:46, Thiago Jung Bauermann via Gdb-patches wrote: >> --- /dev/null >> +++ b/gdb/testsuite/gdb.arch/aarch64-sve.exp >> @@ -0,0 +1,101 @@ >> +# Copyright 2022 Free Software Foundation, Inc. >> + >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 3 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program. If not, see . >> + >> +# Test a binary that uses SVE and exercise changing the SVE vector length. >> + >> +if {[skip_aarch64_sve_tests]} { >> + verbose "Skipping ${gdb_test_file_name}." >> + return >> +} >> + >> +standard_testfile >> +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { >> + return >> +} >> + >> +set linespec ${srcfile}:[gdb_get_line_number "break here"] >> + >> +if ![runto ${linespec}] { >> + return >> +} >> + >> +# Count number of lines in "info registers" output. >> +proc count_info_registers {} { >> + global gdb_prompt >> + set ret 0 >> + >> + gdb_test_multiple "info all-registers" "" { > > The use of "info all-registers" seems to introduce a lot of verbosity to the test and make it much slower (as you pointed out). > > Checking the code, it seems we always have either FPU or SVE. So at first glance it may not be worth it to list all of the possible > fpu/vector registers here. > > With that said, there are upcoming features that may add registers to the vector group (SME), so might as well check all the registers. > > That's a very verbose way to say the above looks good. :-) Thank yo for the analysis. I think that the test completeness is worth the extra time it takes. >> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp >> index a8f25b5f0dd5..b6bfa8eaafa5 100644 >> --- a/gdb/testsuite/lib/gdb.exp >> +++ b/gdb/testsuite/lib/gdb.exp >> @@ -7885,6 +7885,12 @@ proc multi_line_input { args } { >> return [join $args "\n"] >> } >> +# Return how many newlines there are in the given string. >> + >> +proc count_newlines { string } { >> + return [regexp -all "\n" $string] >> +} >> + >> # Return the version of the DejaGnu framework. >> # >> # The return value is a list containing the major, minor and patch version >> diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp >> index ca56e12b06bf..e821c0f6914f 100644 >> --- a/gdb/testsuite/lib/mi-support.exp >> +++ b/gdb/testsuite/lib/mi-support.exp >> @@ -1728,10 +1728,6 @@ set mi_autotest_data "" >> # The name of the source file for autotesting. >> set mi_autotest_source "" >> -proc count_newlines { string } { >> - return [regexp -all "\n" $string] >> -} >> - >> # Prepares for running inline tests in FILENAME. >> # See comments for mi_run_inline_test for detailed >> # explanation of the idea and syntax. > > This looks good to me overall. I'd be more comfortable with someone else approving the generic bits (though they look > quite obvious to me). Ok, hopefully others will agree. :-) > Again, thanks for the patch. Thank you again for reviewing both versions of these patches! -- Thiago