All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Daniel P.Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-arm@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Gustavo Romero" <gustavo.romero@linaro.org>
Subject: Re: [PATCH 05/27] tests/tcg/meson.build: introduce exe_name
Date: Wed, 24 Jun 2026 18:27:05 +0100	[thread overview]
Message-ID: <8733ybkfx2.fsf@draig.linaro.org> (raw)
In-Reply-To: <eac12939-fa27-4282-8913-1fbf463702a9@oss.qualcomm.com> (Pierrick Bouvier's message of "Wed, 24 Jun 2026 10:01:12 -0700")

Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:

> On 6/24/2026 8:06 AM, Alex Bennée wrote:
>> Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
>> 
>>> We add possibility to duplicate a test executable for a given source
>>> file. This is needed when different cflags need to be used (like
>>> vectorized vs non-vectorized for instance, like sve tests in aarch64).
>>>
>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
>>> ---
>>>  tests/tcg/meson.build | 17 +++++++++++++++--
>>>  1 file changed, 15 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
>>> index 72d1a9f8986..2c6d85c586a 100644
>>> --- a/tests/tcg/meson.build
>>> +++ b/tests/tcg/meson.build
>>> @@ -11,6 +11,7 @@ tcg_tests = {}
>>>  #     'tests': [
>>>  #       {
>>>  #         'src_file': {
>>> +#           'exe_name': ['provide an alternative binary name'],
>>>  #         }
>>>  #       },
>>>  #       ...
>>> @@ -18,10 +19,10 @@ tcg_tests = {}
>>>  #   }
>>>  # }
>>>  #
>>> -# Every test executable, is built only once.
>>> +# Every test executable, identified by 'exe_name' is built only once.
>>>  # Tests for a given src use the same executable by default, and their definition
>>>  # is guaranteed to be unique also.
>>> -# Default name is derived from src.
>>> +# Default name is derived from src if 'exe_name' is omitted.
>>>  
>>>  # plugins come first, as we need to build the list
>>>  subdir('plugins')
>>> @@ -47,11 +48,23 @@ foreach target, plan: tcg_tests
>>>  
>>>    foreach t : tests
>>>      foreach src, setup: t
>>> +      # return a clear error if user mispell a setup entry
>>> +      foreach key, _ : setup
>>> +        if key not in [
>>> +                       'exe_name',
>>> +                       ]
>>> +          error('unknown tcg setup entry \'' + key + '\' for test ' + src)
>>> +        endif
>>> +      endforeach
>>> +
>>>        # meson '/' operator drops left operand if right is an absolute path
>>>        src = folder / src
>>>        file = files(src)
>>>        test = fs.name(file)
>>>        exe_name = fs.stem(src)
>>> +      if 'exe_name' in setup
>>> +        exe_name = setup['exe_name']
>>> +      endif
>>>
>> 
>> Would it be better to put exe_name = fs.stem(src) in an else leg?
>>
>
> The rest of the file follow the pattern
> var = default
> if (different)
>   var = other
>
> So better to stick with one pattern for consistency.

Sure - but the other meson files seem to follow the other pattern, e.g.: 

if cpu not in supported_cpus
  host_arch = 'unknown'
else
  host_arch = cpu
endif


> It absolutely does not matter for "performance".
>
>> Anyway:
>> 
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>> 
>> 
>>>        exe_name = target + '-' + exe_name
>>>        test_name = exe_name
>> 

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-06-24 17:27 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 21:47 [PATCH 00/27] tests/tcg: run tests with meson Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 01/27] tests/tcg/multiarch/system/memory.c: remove unused variable Pierrick Bouvier
2026-06-10  0:35   ` Richard Henderson
2026-06-24 14:21   ` Alex Bennée
2026-06-24 15:56   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 02/27] tests/tcg/multiarch/plugin/check-plugin-output.sh: take test output as input Pierrick Bouvier
2026-06-10  0:38   ` Richard Henderson
2026-06-24 14:29   ` Alex Bennée
2026-06-09 21:47 ` [PATCH 03/27] tests/tcg/multiarch/plugin: rename check-plugin-output to regex-compare Pierrick Bouvier
2026-06-10  0:39   ` Richard Henderson
2026-06-24 14:29   ` Alex Bennée
2026-06-09 21:47 ` [PATCH 04/27] tests/tcg: introduce meson.build Pierrick Bouvier
2026-06-10  4:30   ` Pierrick Bouvier
2026-06-24 14:54   ` Alex Bennée
2026-06-24 16:53     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 05/27] tests/tcg/meson.build: introduce exe_name Pierrick Bouvier
2026-06-10  7:03   ` Manos Pitsidianakis
2026-06-10 18:32     ` Pierrick Bouvier
2026-06-24 15:06   ` Alex Bennée
2026-06-24 17:01     ` Pierrick Bouvier
2026-06-24 17:27       ` Alex Bennée [this message]
2026-06-09 21:47 ` [PATCH 06/27] tests/tcg/meson.build: introduce test_name Pierrick Bouvier
2026-06-10  7:08   ` Manos Pitsidianakis
2026-06-10 18:34     ` Pierrick Bouvier
2026-06-24 15:50     ` Alex Bennée
2026-06-09 21:47 ` [PATCH 07/27] tests/tcg/meson.build: introduce cflags Pierrick Bouvier
2026-06-10  7:12   ` Manos Pitsidianakis
2026-06-24 15:53   ` Alex Bennée
2026-06-09 21:47 ` [PATCH 08/27] tests/tcg/meson.build: introduce qemu_args Pierrick Bouvier
2026-06-10  7:14   ` Manos Pitsidianakis
2026-06-10  8:46   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 09/27] tests/tcg/meson.build: introduce env_var Pierrick Bouvier
2026-06-10  7:14   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 10/27] tests/tcg/plugins: build list of test_plugins Pierrick Bouvier
2026-06-10  7:15   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 11/27] tests/tcg/meson.build: introduce plugin_test Pierrick Bouvier
2026-06-10  7:17   ` Manos Pitsidianakis
2026-06-10 18:35     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 12/27] tests/tcg/meson.build: test gdb support and introduce gdb_arch Pierrick Bouvier
2026-06-10  7:20   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 13/27] tests/tcg/meson.build: introduce gdb_test Pierrick Bouvier
2026-06-10  7:23   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 14/27] tests/tcg/meson.build: add default flag for testing compiler support Pierrick Bouvier
2026-06-10  8:34   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 15/27] tests/tcg/meson.build: introduce wrapper Pierrick Bouvier
2026-06-10  8:33   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 16/27] tests/tcg/meson.build: introduce expected_output Pierrick Bouvier
2026-06-10  4:30   ` Pierrick Bouvier
2026-06-10  7:25     ` Manos Pitsidianakis
2026-06-10 18:40       ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 17/27] tests/tcg/meson.build: add wrapper run_and_check_forbidden_output Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 18/27] tests/tcg/meson.build: add wrapper run_with_input Pierrick Bouvier
2026-06-10  7:28   ` Manos Pitsidianakis
2026-06-10 18:42     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 19/27] tests/tcg/meson.build: add wrapper record_replay Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 20/27] tests/tcg/meson.build: add wrapper check_plugin_output Pierrick Bouvier
2026-06-10  7:30   ` Manos Pitsidianakis
2026-06-10 17:09     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 21/27] tests/tcg/aarch64: add user tests Pierrick Bouvier
2026-06-10  0:18   ` Richard Henderson
2026-06-10  4:29     ` Pierrick Bouvier
2026-06-10  8:55     ` Paolo Bonzini
2026-06-09 21:47 ` [PATCH 22/27] tests/tcg/aarch64: add system tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 23/27] tests/tcg/multiarch: declare user tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 24/27] tests/tcg/aarch64: add multiarch " Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 25/27] tests/tcg/multiarch: declare system tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 26/27] tests/tcg/aarch64: add multiarch " Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 27/27] tests/tcg/meson.build: add generic plugin tests Pierrick Bouvier
2026-06-09 22:10 ` [PATCH 00/27] tests/tcg: run tests with meson Pierrick Bouvier
2026-06-10  9:17 ` Paolo Bonzini
2026-06-10 17:01   ` Pierrick Bouvier
2026-06-11 14:49     ` Paolo Bonzini
2026-06-11 19:23       ` Pierrick Bouvier
2026-06-11 20:47         ` Paolo Bonzini

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=8733ybkfx2.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=erdnaxe@crans.org \
    --cc=gustavo.romero@linaro.org \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.