Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2014-08-26 07:53:58 +0400
committerPavel Emelyanov <xemul@parallels.com>2014-08-26 13:08:56 +0400
commit3b9e9b84f2ac7580b3b7f913026098cb47f88fbd (patch)
tree659fceeeecfd7a5142be6488470aea8c126240e8
parent3a8cf03d9478013efdc87bb099f3e37d58231cfb (diff)
test: enhance library lookup when building mntns root
Use a single awk script to parse the ldd output. Filter out other cases that are clearly not libraries, such as static builds ("not a dynamic executable") and linux-gate.so. Make the grep for vdso more specific into linux-vdso.so. Tested: - sudo test/zdtm.sh '^ns/.*' Signed-off-by: Filipe Brandenburger <filbranden@google.com> Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
-rwxr-xr-xtest/zdtm.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 06152a658..cfbdce27e 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -337,7 +337,15 @@ construct_root()
# libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6dc5000)
# /lib/ld-linux-armhf.so.3 (0xb6f0b000)
- for i in `ldd $test_path $ps_path | grep -P '^\s' | grep -v vdso | sed "s/.*=> //" | awk '{ print $1 }'`; do
+ local libs=$(ldd $test_path $ps_path | awk '
+ !/^[ \t]/ { next }
+ /\<linux-vdso\.so\>/ { next }
+ /\<linux-gate\.so\>/ { next }
+ /\<not a dynamic executable$/ { next }
+ $2 ~ /^=>$/ { print $3; next }
+ { print $1 }
+ ')
+ for i in ${libs}; do
local ldir lib=`basename $i`
[ -f $libdir2/$lib ] && continue # fast path