From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by sourceware.org (Postfix) with ESMTPS id 4AA553852753 for ; Mon, 18 Jul 2022 13:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4AA553852753 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id j1so12695512wrs.4 for ; Mon, 18 Jul 2022 06:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XlnkvM3iYwNirp93HtLtfLNvErvfmYtEzprxa99bz7g=; b=T/jDxfHBfBTk0Jvas8FGiTUDZEoUG21Jx7ov64yQC1LB9LSRL3sTCJGwRC6rSlU227 RKR0GHwU7NpbSb/u5jbEARHRtJSxe80eVBJlH/K98dqyOnLwODkbYIxDaP0WiSAUmL6Q Pq9RwsFZnESd5K0U67l9hb88VdmAGEYS58mvryTYPA7TJYJTFO2WKFMqXsszCZvfYua5 0Q5aZ+R4M82TvN4AhMrHZdQFDX+e1+Zblfd8K9s9qkPrHoFX3I7EAm6IJfCUezITLA0e xI8G4eZAN09XVvBcJeFxeQLuud/rQaqpECe6VxAFUBuCzrPQwzowu/jOkZNWo/s2fIyA ClPw== X-Gm-Message-State: AJIora9L5cJJ2/OF87gOO75dFsPiv/09d/Pj3KXaNakMXCJgLnUVUI0e avqQOnmWld9hDoQUsnYHW2oNsihGvK8= X-Google-Smtp-Source: AGRyM1t/Tu3YK3R//3cS3bPBXsnoRcV3Vjp/++oB0ieoU6YLhHEZqlvEL0/9NsN5QA8F9Po6poHSaA== X-Received: by 2002:a05:6000:1869:b0:21d:6e78:3f4d with SMTP id d9-20020a056000186900b0021d6e783f4dmr22448770wri.549.1658152472771; Mon, 18 Jul 2022 06:54:32 -0700 (PDT) Received: from ?IPv6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id e9-20020a05600c4e4900b0039c811077d3sm15715291wmq.22.2022.07.18.06.54.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jul 2022 06:54:31 -0700 (PDT) Subject: Re: [PATCH] [AArch64,v5] MTE corefile support To: Luis Machado , gdb-patches@sourceware.org References: <20220503215632.914608-1-luis.machado@arm.com> <20220711105753.19978-1-luis.machado@arm.com> From: Pedro Alves Message-ID: <541510b3-fe64-45cf-c505-dc758a2b4122@palves.net> Date: Mon, 18 Jul 2022 14:54:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20220711105753.19978-1-luis.machado@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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: Mon, 18 Jul 2022 13:54:35 -0000 Hi! This version looks good to me. Just one nit in the testcase. No need to repost for this. On 2022-07-11 11:57 a.m., Luis Machado wrote: > +foreach_with_prefix mode {"sync" "async"} { > + > + if {$mode == "async"} { > + lappend compile_flags "additional_flags=-DASYNC" > + } > + > + standard_testfile > + set executable "${testfile}-${mode}" > + if {[prepare_for_testing "failed to prepare" ${executable} ${srcfile} ${compile_flags}]} { > + return -1 If we hit this return while testing "sync", then "async" won't be tested either. Similarly for the other returns below. To avoid scenarios like this (and in the future if the code evolves to have more early returns), it's IMO better/safer to move the body of the foreach_with_prefix to a procedure, like: proc test {mode} { global srcfile testfile if {$mode == "async"} { lappend compile_flags "additional_flags=-DASYNC" } standard_testfile set executable "${testfile}-${mode}" if {[prepare_for_testing "failed to prepare" ${executable} ${srcfile} ${compile_flags}]} { return -1 ... } foreach_with_prefix mode {"sync" "async"} { test $mode } Pedro Alves > + } > + set binfile [standard_output_file ${executable}] > + > + if ![runto_main] { > + untested "could not run to main" > + return -1 > + } > + > + # Targets that don't support memory tagging should not execute the > + # runtime memory tagging tests. > + if {![supports_memtag]} { > + unsupported "memory tagging unsupported" > + return -1 > + }