[PATCH] tests/tcg: Fix building outside of the source tree

Ilya Leoshkevich posted 1 patch 1 week, 4 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
tests/tcg/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/tcg: Fix building outside of the source tree
Posted by Ilya Leoshkevich 1 week, 4 days ago
Running TCG tests from a build directory that is outside of the source
tree fails with:

    [...]/qemu/tests/tcg/multiarch/libs/float_helpers.c:228:1: fatal error: opening dependency file tests/tcg/s390x-linux-user-float_convs.d: No such file or directory

This is because the build directory is not mounted into the container.
Add this mount. Do not bother with preventing overlapping mounts, they
are harmless.

Fixes: 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 tests/tcg/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index d41a228fb3d..cae64efb06c 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -269,7 +269,7 @@ foreach target, plan: tcg_tests
       mount = mount + ':' + mount
       here = meson.project_build_root()
       cc = [docker_wrapper, 'run', '--run-as-current-user',
-            '-w', here, '-v', mount,
+            '-w', here, '-v', here + ':' + here, '-v', mount,
             cc_dockerfile, plan['cc']]
       has_cc = true
     endif
-- 
2.55.0
Re: [PATCH] tests/tcg: Fix building outside of the source tree
Posted by Alex Bennée 1 week, 3 days ago
Ilya Leoshkevich <iii@linux.ibm.com> writes:

> Running TCG tests from a build directory that is outside of the source
> tree fails with:
>
>     [...]/qemu/tests/tcg/multiarch/libs/float_helpers.c:228:1: fatal error: opening dependency file tests/tcg/s390x-linux-user-float_convs.d: No such file or directory
>
> This is because the build directory is not mounted into the container.
> Add this mount. Do not bother with preventing overlapping mounts, they
> are harmless.
>
> Fixes: 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>

Queued to testing/next, thanks.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH] tests/tcg: Fix building outside of the source tree
Posted by Richard Henderson 1 week, 3 days ago
On 9/15/26 01:08, Ilya Leoshkevich wrote:
> Running TCG tests from a build directory that is outside of the source
> tree fails with:
> 
>      [...]/qemu/tests/tcg/multiarch/libs/float_helpers.c:228:1: fatal error: opening dependency file tests/tcg/s390x-linux-user-float_convs.d: No such file or directory
> 
> This is because the build directory is not mounted into the container.
> Add this mount. Do not bother with preventing overlapping mounts, they
> are harmless.
> 
> Fixes: 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
> Signed-off-by: Ilya Leoshkevich<iii@linux.ibm.com>
> ---
>   tests/tcg/meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Re: [PATCH] tests/tcg: Fix building outside of the source tree
Posted by Pierrick Bouvier 1 week, 4 days ago
On 9/15/2026 4:08 AM, Ilya Leoshkevich wrote:
> Running TCG tests from a build directory that is outside of the source
> tree fails with:
> 
>     [...]/qemu/tests/tcg/multiarch/libs/float_helpers.c:228:1: fatal error: opening dependency file tests/tcg/s390x-linux-user-float_convs.d: No such file or directory
> 
> This is because the build directory is not mounted into the container.
> Add this mount. Do not bother with preventing overlapping mounts, they
> are harmless.
> 
> Fixes: 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  tests/tcg/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Good catch, thanks.
Note: in case we need to add :z flag to mount for SELinux, this will
have to be done here also.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>