All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/docker: Fix _get_so_libs() for docker-binfmt-image
@ 2021-01-19  5:01 Philippe Mathieu-Daudé
  2021-01-19 11:21 ` Alex Bennée
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-19  5:01 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Philippe Mathieu-Daudé,
	Alex Bennée, Laurent Vivier, Philippe Mathieu-Daudé

Fix a variable rename mistake from commit 5e33f7fead5:

  Traceback (most recent call last):
    File "./tests/docker/docker.py", line 710, in <module>
      sys.exit(main())
    File "./tests/docker/docker.py", line 706, in main
      return args.cmdobj.run(args, argv)
    File "./tests/docker/docker.py", line 489, in run
      _copy_binary_with_libs(args.include_executable,
    File "./tests/docker/docker.py", line 149, in _copy_binary_with_libs
      libs = _get_so_libs(src)
    File "./tests/docker/docker.py", line 123, in _get_so_libs
      libs.append(s.group(1))
  NameError: name 's' is not defined

Fixes: 5e33f7fead5 ("tests/docker: better handle symlinked libs")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
"Tested-by" but apparently not enough... Well actually it was on
Debian, now using Fedora.
---
 tests/docker/docker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 884dfeb29c4..0b4f6167b3d 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -120,7 +120,7 @@ def _get_so_libs(executable):
             search = ldd_re.search(line)
             if search:
                 try:
-                    libs.append(s.group(1))
+                    libs.append(search.group(1))
                 except IndexError:
                     pass
     except subprocess.CalledProcessError:
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/docker: Fix _get_so_libs() for docker-binfmt-image
  2021-01-19  5:01 [PATCH] tests/docker: Fix _get_so_libs() for docker-binfmt-image Philippe Mathieu-Daudé
@ 2021-01-19 11:21 ` Alex Bennée
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2021-01-19 11:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Philippe Mathieu-Daudé, qemu-devel, Laurent Vivier


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Fix a variable rename mistake from commit 5e33f7fead5:
>
>   Traceback (most recent call last):
>     File "./tests/docker/docker.py", line 710, in <module>
>       sys.exit(main())
>     File "./tests/docker/docker.py", line 706, in main
>       return args.cmdobj.run(args, argv)
>     File "./tests/docker/docker.py", line 489, in run
>       _copy_binary_with_libs(args.include_executable,
>     File "./tests/docker/docker.py", line 149, in _copy_binary_with_libs
>       libs = _get_so_libs(src)
>     File "./tests/docker/docker.py", line 123, in _get_so_libs
>       libs.append(s.group(1))
>   NameError: name 's' is not defined
>
> Fixes: 5e33f7fead5 ("tests/docker: better handle symlinked libs")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> "Tested-by" but apparently not enough... Well actually it was on
> Debian, now using Fedora.

Also we don't notice if we use static binaries (which I do most of the time).

Queued to testing/next, thanks.

> ---
>  tests/docker/docker.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 884dfeb29c4..0b4f6167b3d 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -120,7 +120,7 @@ def _get_so_libs(executable):
>              search = ldd_re.search(line)
>              if search:
>                  try:
> -                    libs.append(s.group(1))
> +                    libs.append(search.group(1))
>                  except IndexError:
>                      pass
>      except subprocess.CalledProcessError:


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-19 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19  5:01 [PATCH] tests/docker: Fix _get_so_libs() for docker-binfmt-image Philippe Mathieu-Daudé
2021-01-19 11:21 ` 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.