* Re: [PATCH v3 02/17] tests/docker: better handle symlinked libs
[not found] <BYAPR13MB2455076A60A04F532838EED580000@BYAPR13MB2455.namprd13.prod.outlook.com>
@ 2020-02-03 19:02 ` Robert Foley
0 siblings, 0 replies; 2+ messages in thread
From: Robert Foley @ 2020-02-03 19:02 UTC (permalink / raw)
To: qemu-devel, Alex Bennée
Cc: fam, berrange, stefanb, Richard Henderson, f4bug, cota, stefanha,
pbonzini, marcandre.lureau, Philippe Mathieu-Daudé,
aurelien
On Mon, 3 Feb 2020 at 04:09, Alex Bennée <alex.bennee@linaro.org> wrote:
> Subject: [PATCH v3 02/17] tests/docker: better handle symlinked libs
>
> When we are copying we want to ensure we grab the first
> resolution (the found in path section). However even that binary might
> be a symlink so lets make sure we chase the symlinks to copy the right
> binary to where it can be found.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v3 00/17] testing/next (with build fixes, finally GREEN!)
@ 2020-02-03 9:09 Alex Bennée
2020-02-03 9:09 ` [PATCH v3 02/17] tests/docker: better handle symlinked libs Alex Bennée
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2020-02-03 9:09 UTC (permalink / raw)
To: qemu-devel
Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
f4bug, cota, stefanha, marcandre.lureau, pbonzini, aurelien
Hi,
The main changes from v2 are dropping the travis_retry (the aarch64
timeout was simply taking too long on the same failing test) and
tweaks to the parallelism of the various bits of build.
The following patches need review
03 - gitlab ci Refresh the list of iotests
07 - .travis.yml Drop superfluous use of python python
08 - .travis.yml Add description to each job
13 - tests tcg gate pauth tests on having compiler sup
14 - .travis.yml introduce TEST_BUILD_CMD and use it f
15 - .travis.yml drop the travis_retry from tests
16 - .travis.yml drop cris linux user from the plugins
17 - .travis.yml single thread build tcg
Alex Bennée (12):
tests/docker: move most cross compilers to buster base
tests/docker: better handle symlinked libs
.shippable: --disable-docs for cross-compile tests
.travis.yml: build documents under bionic
.travis.yml: move cache flushing to early common phase
.travis.yml: probe for number of available processors
tests/tcg: add a configure compiler check for ARMv8.1 and SVE
tests/tcg: gate pauth-% tests on having compiler support
.travis.yml: introduce TEST_BUILD_CMD and use it for check-tcg
.travis.yml: drop the travis_retry from tests
.travis.yml: drop cris-linux-user from the plugins test
.travis.yml: single thread build-tcg
Philippe Mathieu-Daudé (3):
hw/hppa/Kconfig: LASI chipset requires PARALLEL port
.travis.yml: Drop superfluous use of --python=python3 parameter
.travis.yml: Add description to each job
Thomas Huth (1):
gitlab-ci: Refresh the list of iotests
Wainer dos Santos Moschetta (1):
travis.yml: Install genisoimage package
.gitlab-ci.yml | 12 +-
.shippable.yml | 2 +-
.travis.yml | 164 ++++++++++++------
hw/hppa/Kconfig | 1 +
tests/docker/Makefile.include | 16 +-
tests/docker/docker.py | 16 +-
tests/docker/dockerfiles/debian-amd64.docker | 2 +-
.../dockerfiles/debian-armel-cross.docker | 2 +-
.../dockerfiles/debian-armhf-cross.docker | 2 +-
.../dockerfiles/debian-mips64el-cross.docker | 2 +-
.../dockerfiles/debian-mipsel-cross.docker | 2 +-
.../dockerfiles/debian-ppc64el-cross.docker | 2 +-
.../dockerfiles/debian-s390x-cross.docker | 2 +-
tests/tcg/aarch64/Makefile.softmmu-target | 12 +-
tests/tcg/aarch64/Makefile.target | 2 +
tests/tcg/configure.sh | 18 ++
16 files changed, 174 insertions(+), 83 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v3 02/17] tests/docker: better handle symlinked libs
2020-02-03 9:09 [PATCH v3 00/17] testing/next (with build fixes, finally GREEN!) Alex Bennée
@ 2020-02-03 9:09 ` Alex Bennée
0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2020-02-03 9:09 UTC (permalink / raw)
To: qemu-devel
Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
f4bug, Philippe Mathieu-Daudé,
cota, stefanha, marcandre.lureau, pbonzini, aurelien
When we are copying we want to ensure we grab the first
resolution (the found in path section). However even that binary might
be a symlink so lets make sure we chase the symlinks to copy the right
binary to where it can be found.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v3
- fix comment
- fix grouping extraction
- try/except on IndexError
---
tests/docker/docker.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 31d8adf836e..d8268c11117 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -106,18 +106,19 @@ def _get_so_libs(executable):
"""Return a list of libraries associated with an executable.
The paths may be symbolic links which would need to be resolved to
- ensure theright data is copied."""
+ ensure the right data is copied."""
libs = []
- ldd_re = re.compile(r"(/.*/)(\S*)")
+ ldd_re = re.compile(r"(?:\S+ => )?(\S*) \(:?0x[0-9a-f]+\)")
try:
ldd_output = subprocess.check_output(["ldd", executable]).decode('utf-8')
for line in ldd_output.split("\n"):
search = ldd_re.search(line)
- if search and len(search.groups()) == 2:
- so_path = search.groups()[0]
- so_lib = search.groups()[1]
- libs.append("%s/%s" % (so_path, so_lib))
+ if search:
+ try:
+ libs.append(s.group(1))
+ except IndexError:
+ pass
except subprocess.CalledProcessError:
print("%s had no associated libraries (static build?)" % (executable))
@@ -145,7 +146,8 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir):
if libs:
for l in libs:
so_path = os.path.dirname(l)
- _copy_with_mkdir(l, dest_dir, so_path)
+ real_l = os.path.realpath(l)
+ _copy_with_mkdir(real_l, dest_dir, so_path)
def _check_binfmt_misc(executable):
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-03 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <BYAPR13MB2455076A60A04F532838EED580000@BYAPR13MB2455.namprd13.prod.outlook.com>
2020-02-03 19:02 ` [PATCH v3 02/17] tests/docker: better handle symlinked libs Robert Foley
2020-02-03 9:09 [PATCH v3 00/17] testing/next (with build fixes, finally GREEN!) Alex Bennée
2020-02-03 9:09 ` [PATCH v3 02/17] tests/docker: better handle symlinked libs Alex Bennée
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.