From: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH v5 11/17] tests/docker: strip remaining caching logic from docker.py
Date: Fri, 18 Sep 2026 10:07:42 -0700 [thread overview]
Message-ID: <7393baca-7746-4211-94cd-e0400cb864b2@oss.qualcomm.com> (raw)
In-Reply-To: <87y0cy6ace.fsf@draig.linaro.org>
On 9/18/2026 4:57 AM, Alex Bennée wrote:
> Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
>
>> On 9/18/2026 12:30 AM, Alex Bennée wrote:
>>> Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
>>>
>>>> On 9/17/2026 3:18 PM, Richard Henderson wrote:
>>>>> On 9/17/26 12:00, Pierrick Bouvier wrote:
>>>>>> On 9/17/2026 2:49 PM, Alex Bennée wrote:
>>>>>>> how much time? it flies past when I run a rebuild.
>>>>>>>
>>>>>>
>>>>>> For a no-op tcg-tests build (i.e. with tests already built):
>>>>>>
>>>>>> - With current patch:
>>>>>> time ninja -C tcg-tests
>>>>>> ...
>>>>>> verbose pull and build
>>>>>> 320 lines of output
>>>>>> ...
>>>>>> real 0m15.817s
>>>>>> user 0m1.342s
>>>>>> sys 0m0.840s
>>>
>>> ✗ time ninja
>>> [1/114] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
>>>
>>> ________________________________________________________
>>> Executed in 515.16 millis fish external
>>> usr time 433.82 millis 968.00 micros 432.85 millis
>>> sys time 86.05 millis 253.00 micros 85.80 millis
>>>
>>> Not sure whats going on there then. The whole tcg suite completes in
>>> under a minute (and would be shorter if i386-linux-user-test-i386-fprem
>>> and riscv64-softmmu-plugin-discons-with-interruptedmemory where in the
>>> thorough test suite).
>>>
>>
>> You need to run "ninja tcg-tests" explicitly, as tests (and images) are
>> not built by default.
>
> What is that target trying to do? Because when I run:
>
tcg-tests will build only tests (and their dependencies, container images).
tcg/tests/meson.build
```
if exe_name not in built_tests
exe = custom_target(exe_name,
input: file,
command: [cc, '@INPUT@',
'-o', '@OUTPUT@', '-static',
'-MMD', '-MF', '@DEPFILE@',
'-Wall', '-Werror',
'-O0', '-g', '-fno-strict-aliasing',
cflags],
depfile: exe_name + '.d',
output: exe_name + '.test',
depends: exe_depends,
depend_files: build_test_depend_files,
build_by_default: false)
exe_targets += exe
endif
...
if exe_targets.length() > 0
# finally create a top level target to rebuild all tests
alias_target('tcg-tests', exe_targets)
endif
```
build_test_depend_files contains container images, and eventually some
generated files given in "depends" field of test declaration. It's used
for x86 tests who need to generate headers.
Test compilation generates depfile (.d), which meson reintegrates
automatically, so test depends on all their headers correctly.
```
build_test_depends = []
build_test_depends_files = []
...
build_test_depends += image_targets[cc_dockerfile]
build_test_depend_files += dockerfile
...
exe_depends = build_test_depends
if 'depends' in setup
exe_depends += setup['depends']
endif
exe..
depends: exe_depends,
depend_files: build_test_depend_files,
# meson has distinct fields for target dependencies and file
# dependencies, which is a bit confusing IMHO.
```
> ./run meson test --suite tcg
>
This target will build test dependencies, and run them also.
```
test(test_name, env, args: cmd,
depends: test_depends,
timeout: 120,
suite: ['tcg', 'tcg-' + target])
```
test_depends contains the test binary itself (as seen above), but also
qemu binaries, plugins.
```
test_depends = []
...
if 'plugin_test' in setup
test_depends += plugin
endif
...
test_depends += qemu
```
Also, meson adds an implicit dependency on every target included in cmd
(args: cmd) array, which includes transitively test binaries and all
their deps.
> it still ends up rebuilding the test binaries.
>
So from all code above, it should now be clear that:
`meson --suite tcg`
will automatically build all that is needed (and no more - like no other
test binaries). Also, if you modify an existing dockerfile, it will
automatically rebuilds all tests associated for you.
Same goes for any subsuite: tcg-aarch64-softmmu, which only build
qemu-system-aarch64, needed container images, and only test binaries.
Beyond a better maintainability, one of the goal of original series was
to have *complete* dependencies, so we never need to add fake "all"
dependencies on Makefile level, which is why I insisted to remove the
patch that was doing it for images in this series.
Hope it's more clear now!
>>
>>>>>
>>>>> The variance from the middle of the pacific ocean, and associated
>>>>> network latency, is between 20 and 27 seconds.
>>>>>
>>>>> Amusingly, with the network actively disconnected (airplane mode), the
>>>>> no-op build completes in 1 to 2 seconds.
>>>>>
>>>>
>>>> Funny, on my side if hangs a long time (timeout 30s), then retry 3 times
>>>> per image. I tried it on WSL on my windows laptop.
>>>>
>>>>>
>>>>> r~
>>>
>
next prev parent reply other threads:[~2026-09-18 17:08 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:55 [PATCH v5 00/17] testing: various docker clean-ups post meson tcg conversion (pre-PR) Alex Bennée
2026-09-17 16:55 ` [PATCH v5 01/17] Revert "configure: remove cross_cc and gdb detection logic" Alex Bennée
2026-09-17 16:55 ` [PATCH v5 02/17] configure: ensure it also honours container configuration Alex Bennée
2026-09-17 16:55 ` [PATCH v5 03/17] configure: correctly honour --disable-containers Alex Bennée
2026-09-17 16:55 ` [PATCH v5 04/17] configure: re-purpose the tcg test compiler configs for vdso building Alex Bennée
2026-09-17 16:55 ` [PATCH v5 05/17] tests/tcg/s390x: Provide the libc bits needed by the system tests Alex Bennée
2026-09-17 16:55 ` [PATCH v5 06/17] tests/tcg: prefix meson built docker tags with qemu/ Alex Bennée
2026-09-17 16:55 ` [PATCH v5 07/17] tests/tcg: use --add-current-user when building containers Alex Bennée
2026-09-17 16:55 ` [PATCH v5 08/17] tests/tcg: don't define tests when missing compilers Alex Bennée
2026-09-17 17:14 ` Pierrick Bouvier
2026-09-17 16:55 ` [PATCH v5 09/17] tests/docker: add container registry to configure and use Alex Bennée
2026-09-17 16:55 ` [PATCH v5 10/17] tests/docker: remove used _read_qemu_dockerfile Alex Bennée
2026-09-17 16:55 ` [PATCH v5 11/17] tests/docker: strip remaining caching logic from docker.py Alex Bennée
2026-09-17 21:19 ` Pierrick Bouvier
2026-09-17 21:49 ` Alex Bennée
2026-09-17 22:00 ` Pierrick Bouvier
2026-09-17 22:18 ` Richard Henderson
2026-09-17 22:25 ` Pierrick Bouvier
2026-09-18 7:30 ` Alex Bennée
2026-09-18 8:05 ` Pierrick Bouvier
2026-09-18 8:29 ` Pierrick Bouvier
2026-09-18 11:57 ` Alex Bennée
2026-09-18 17:07 ` Pierrick Bouvier [this message]
2026-09-18 17:58 ` Richard Henderson
2026-09-18 19:22 ` Pierrick Bouvier
2026-09-18 19:53 ` Richard Henderson
2026-09-18 20:21 ` Pierrick Bouvier
2026-09-17 16:55 ` [PATCH v5 12/17] tests/docker: add specific command to parser Alex Bennée
2026-09-17 16:55 ` [PATCH v5 13/17] tests/docker: fix ccache directory variable expansion Alex Bennée
2026-09-17 17:21 ` Pierrick Bouvier
2026-09-17 16:55 ` [PATCH v5 14/17] gitlab: update the @user id mapping file Alex Bennée
2026-09-17 16:55 ` [PATCH v5 15/17] tests/tcg: add console property to docker image custom target Alex Bennée
2026-09-17 16:56 ` [PATCH v5 16/17] tests/tcg: Fix building outside of the source tree Alex Bennée
2026-09-17 16:56 ` [PATCH v5 17/17] gitlab: drop check-tcg from clang-system job Alex Bennée
2026-09-17 17:15 ` Pierrick Bouvier
2026-09-17 17:20 ` [PATCH v5 00/17] testing: various docker clean-ups post meson tcg conversion (pre-PR) Pierrick Bouvier
2026-09-17 17:45 ` Alex Bennée
2026-09-17 18:29 ` Pierrick Bouvier
2026-09-17 18:53 ` Alex Bennée
2026-09-17 22:13 ` Pierrick Bouvier
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=7393baca-7746-4211-94cd-e0400cb864b2@oss.qualcomm.com \
--to=pierrick.bouvier@oss.qualcomm.com \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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.