Commit b5086132 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: don't compile tests with --static

zdtm.sh copies all required libraries in a new root
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 29f6d62a
......@@ -99,6 +99,22 @@ umount_zdtm_root()
}
trap umount_zdtm_root EXIT
construct_root()
{
local root=$1
local test_path=$2
local libdir=$root/lib64
mkdir $libdir
for i in `ldd $test_path | awk '{ print $1 }' | grep -v vdso`; do
local lib=`basename $i`
[ -f $libdir/$lib ] && continue ||
[ -f $i ] && cp $i $libdir && continue ||
[ -f /lib64/$i ] && cp /lib64/$i $libdir && continue ||
[ -f /usr/lib64/$i ] && cp /usr/lib64/$i $libdir || return 1
done
}
start_test()
{
local tdir=$1
......@@ -119,6 +135,7 @@ start_test()
ZDTM_ROOT=`readlink -f $ZDTM_ROOT`
mount --bind . $ZDTM_ROOT || return 1
fi
construct_root $ZDTM_ROOT $tdir/$tname || return 1
( export ZDTM_NEWNS=1
export ZDTM_PIDFILE=$TPID
cd $ZDTM_ROOT
......
CFLAGS = --static -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS = -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
LIB = libzdtmtst.a
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = --static -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS = -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
TST_NOFILE = \
busyloop00 \
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = --static -g -O2 -Wall -Werror -fno-strict-aliasing
CFLAGS = -g -O2 -Wall -Werror -fno-strict-aliasing
TST_NOFILE = \
pipe_loop00 \
......
LIBDIR = ../../lib
LIB = $(LIBDIR)/libzdtmtst.a
override CPPFLAGS += -I$(LIBDIR)
CFLAGS = --static -g -O2 -Wall -Werror
CFLAGS = -g -O2 -Wall -Werror
TST_NOFILE = \
file_read \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment