[CRIU] [PATCH 12/14] zdtm: fix collecting libraries on Alpine Linux

Andrei Vagin avagin at virtuozzo.com
Sat Jun 2 00:03:02 MSK 2018


Here is an example of ldd output:

/musl # ldd /usr/lib/libxtables.so.12
	ldd (0x7fae8e06c000)
	libc.musl-x86_64.so.1 => ldd (0x7fae8e06c000)

We need to skip the "ldd (0x7fae8e06c000)" line.

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 test/zdtm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 2b64f419d..76473ab5f 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -191,7 +191,7 @@ class ns_flavor:
 
 	def __copy_libs(self, binary):
 		ldd = subprocess.Popen(["ldd", binary], stdout = subprocess.PIPE)
-		xl = re.compile('^(linux-gate.so|linux-vdso(64)?.so|not a dynamic)')
+		xl = re.compile('^(linux-gate.so|linux-vdso(64)?.so|not a dynamic|.*\s*ldd\s)')
 
 		# This Mayakovsky-style code gets list of libraries a binary
 		# needs minus vdso and gate .so-s
-- 
2.14.3



More information about the CRIU mailing list