From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, stefanb@linux.vnet.ibm.com,
richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org,
stefanha@redhat.com, pbonzini@redhat.com,
marcandre.lureau@redhat.com, aurelien@aurel32.net
Subject: Re: [PATCH v1 2/3] tests/docker: better handle symlinked libs
Date: Wed, 22 Jan 2020 15:46:07 +0100 [thread overview]
Message-ID: <9b180dab-246b-1b1e-8ec8-6585227330a7@redhat.com> (raw)
In-Reply-To: <00813be1-eadb-b3c8-2a3c-084302de78b6@redhat.com>
On 1/22/20 2:24 PM, Wainer dos Santos Moschetta wrote:
>
> On 1/22/20 8:22 AM, Alex Bennée wrote:
>> 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>
>> ---
>> tests/docker/docker.py | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>> index 31d8adf836..96d4326d53 100755
>> --- a/tests/docker/docker.py
>> +++ b/tests/docker/docker.py
>> @@ -109,7 +109,7 @@ def _get_so_libs(executable):
>> ensure theright data is copied."""
>> libs = []
>> - ldd_re = re.compile(r"(/.*/)(\S*)")
>> + ldd_re = re.compile(r"=> ?(/.*/)(\S*)")
Why the 'optional space' after "=>"?
>> try:
>> ldd_output = subprocess.check_output(["ldd",
>> executable]).decode('utf-8')
>> for line in ldd_output.split("\n"):
>> @@ -145,6 +145,7 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir):
>> if libs:
>> for l in libs:
>> so_path = os.path.dirname(l)
>> + real_l = os.path.realpath(l)
>
> real_l is not used.
I suppose the idea is to use it as:
_copy_with_mkdir(real_l, dest_dir, so_path)
>
> - Wainer
>
>> _copy_with_mkdir(l, dest_dir, so_path)
>
next prev parent reply other threads:[~2020-01-22 14:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 10:22 [PATCH v1 0/3] current testing/next queue Alex Bennée
2020-01-22 10:22 ` [PATCH v1 1/3] tests/docker: move most cross compilers to buster base Alex Bennée
2020-01-22 10:22 ` [PATCH v1 2/3] tests/docker: better handle symlinked libs Alex Bennée
2020-01-22 13:24 ` Wainer dos Santos Moschetta
2020-01-22 14:46 ` Philippe Mathieu-Daudé [this message]
2020-01-22 15:58 ` Alex Bennée
2020-01-22 22:15 ` Philippe Mathieu-Daudé
2020-01-22 10:22 ` [PATCH v1 3/3] gitlab-ci: Refresh the list of iotests Alex Bennée
2020-01-22 13:37 ` [PATCH v1 0/3] current testing/next queue Wainer dos Santos Moschetta
2020-01-22 14:15 ` Alex Bennée
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=9b180dab-246b-1b1e-8ec8-6585227330a7@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@redhat.com \
--cc=wainersm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).