Skip to contentSkip to conversation

tests/tcg: Fix building outside of the source tree

PATCH In review Ilya Leoshkevich 4 participants 4 messages Sep 15 – Sep 16 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

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

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")
---
 tests/tcg/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/meson.build +1 -1
index d41a228fb3d..cae64efb06c 100644
@@ -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
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Ilya Leoshkevich

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.

Quoted 6 lines
Fixes 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
---
 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.

Tested-by Reviewed-by on v1 1/1
#2 lore raw
In reply to Ilya Leoshkevich
Quoted 9 lines · Ilya Leoshkevich

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.

Quoted 5 lines
Fixes 27939ad414ca ("tests/tcg/meson.build: introduce cc_dockerfile and cc_docker_host_arch")
---
  tests/tcg/meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

#3 lore raw
In reply to Ilya Leoshkevich
Quoted 11 lines · Ilya Leoshkevich

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")

Queued to testing/next, thanks.

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro