public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [AArch64,v5] MTE corefile support
Date: Tue, 19 Jul 2022 15:25:59 +0100	[thread overview]
Message-ID: <d65007fe-e5a5-2ccb-3699-124e9f247938@arm.com> (raw)
In-Reply-To: <541510b3-fe64-45cf-c505-dc758a2b4122@palves.net>

Hi,

On 7/18/22 14:54, Pedro Alves wrote:
> 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
>   }

Thanks. That made it more organized. I've made the changes and pushed both the GDB and the binutils
changes.

      reply	other threads:[~2022-07-19 14:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 14:03 [AArch64] " Luis Machado
2022-04-21 15:20 ` [PATCH, v2] " Luis Machado
2022-04-21 15:52   ` Eli Zaretskii
2022-04-22  8:12     ` Luis Machado
2022-04-22  8:30       ` Eli Zaretskii
2022-04-22  8:37         ` Luis Machado
2022-04-22  8:43           ` Eli Zaretskii
2022-04-22  8:44             ` Luis Machado
2022-04-22 13:27 ` [PATCH 1/2] " Luis Machado
2022-04-22 13:33   ` Eli Zaretskii
2022-04-22 13:30 ` [PATCH, v3] " Luis Machado
2022-05-03 21:56 ` [PATCH, v4] " Luis Machado
2022-05-12 10:36   ` Luis Machado
2022-05-18 12:46   ` Luis Machado
2022-05-18 13:58     ` John Baldwin
2022-05-23  9:50       ` Luis Machado
2022-05-23  9:49     ` Luis Machado
2022-06-06  9:28   ` Luis Machado
2022-06-06  9:42     ` Kuan-Ying Lee
2022-06-06  9:47       ` Luis Machado
2022-06-06  9:54         ` Kuan-Ying Lee
2022-06-06 10:49     ` Eli Zaretskii
2022-06-22  9:04   ` Luis Machado
2022-06-27 14:51   ` Pedro Alves
2022-07-11 10:13     ` Luis Machado
2022-07-11 10:57   ` [PATCH] [AArch64,v5] " Luis Machado
2022-07-18 13:54     ` Pedro Alves
2022-07-19 14:25       ` Luis Machado [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d65007fe-e5a5-2ccb-3699-124e9f247938@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).