[CRIU] [PATCH 2/2] zdtm.sh: fixed shared libraries retrieval
Andrew Vagin
avagin at parallels.com
Fri Apr 5 06:33:34 EDT 2013
On Thu, Apr 04, 2013 at 04:28:53PM +0000, Alexander Kartashov wrote:
> The pipe retrieving shared libraries the test depends on
>
> ldd $test_path $ps_path | awk '/^\s/{ print $1 }'
>
> doesn't actually produce any output so all NS tests fail
> bacause the system linker fails to locate shared libraries
> the test program depends on. This patch fixes the pipe
> to retrieve the list of libraries properly.
>
> Cc: Andrey Vagin <avagin at openvz.org>
> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> ---
> test/zdtm.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 21cfd2e..8824833 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -188,7 +188,7 @@ construct_root()
> cp $ps_path $root/bin
>
> mkdir $libdir $libdir2
> - for i in `ldd $test_path $ps_path | awk '/^\s/{ print $1 }' | grep -v vdso`; do
> + for i in `ldd $test_path $ps_path | grep -P '^\s' | awk '{ print $1 }' | grep -v vdso`; do
using of grep and awk together is a bad style...
Could you should me output of ldd "$test_path $ps_path"? Why does this
work on x86 and doesn't work on ARM?
> local lib=`basename $i`
> [ -f $libdir/$lib ] && continue ||
> [ -f $i ] && cp $i $libdir && cp $i $libdir2 && continue ||
> --
> 1.7.10.4
>
More information about the CRIU
mailing list