public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Luis Machado <luis.machado@arm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [AArch64,v5] MTE corefile support
Date: Mon, 18 Jul 2022 14:54:30 +0100	[thread overview]
Message-ID: <541510b3-fe64-45cf-c505-dc758a2b4122@palves.net> (raw)
In-Reply-To: <20220711105753.19978-1-luis.machado@arm.com>

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
> +    }


  reply	other threads:[~2022-07-18 13:54 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 [this message]
2022-07-19 14:25       ` Luis Machado

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=541510b3-fe64-45cf-c505-dc758a2b4122@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    /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).