[CRIU] [PATCH 01/44] Test suite: added support for the Debian distribution.

Alexander Kartashov alekskartashov at parallels.com
Mon Jan 7 10:04:30 EST 2013


* Replaced the shell interpreter with bash to run
  the script test/zdtm.sh correctly.

* Added new directories into the routine contruct_root()
  searched by the Debian version of the dynamic linker.

Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 Makefile     |    4 +++-
 test/zdtm.sh |   13 ++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 6f0d479..186c998 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ CC		:= gcc
 ECHO		:= echo
 NM		:= nm
 AWK		:= awk
-SH		:= sh
+SH		:= bash
 MAKE		:= make
 
 # Additional ARCH settings for x86
@@ -186,6 +186,8 @@ clean:
 	$(Q) $(RM) -rf ./test/dump/
 	$(Q) $(RM) -f ./*.gcov ./*.gcda ./*.gcno
 	$(Q) $(RM) -rf ./gcov
+	$(Q) $(RM) -rf ./test/lib/
+	$(Q) $(RM) -rf ./test/lib64/
 	$(Q) $(MAKE) -C protobuf/ clean
 	$(Q) $(MAKE) -C arch/x86/ clean
 	$(Q) $(MAKE) -C pie/ clean
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 2ed2c87..78a58e8 100644
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -178,15 +178,18 @@ construct_root()
 {
 	local root=$1
 	local test_path=$2
-	local libdir=$root/lib64
+	local libdir=$root/lib
+	local libdir2=$root/lib64
 
-	mkdir $libdir
+	mkdir $libdir $libdir2
 	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
+		[ -f $i ] && cp $i $libdir && cp $i $libdir2 && continue ||
+		[ -f /lib64/$i ] && cp /lib64/$i $libdir && cp /lib64/$i $libdir2 && continue ||
+		[ -f /usr/lib64/$i ] && cp /usr/lib64/$i $libdir && cp /usr/lib64/$i $libdir2 && continue ||
+		[ -f /lib/x86_64-linux-gnu/$i ] && cp /lib/x86_64-linux-gnu/$i $libdir && cp /lib/x86_64-linux-gnu/$i $libdir2 && continue ||
+		[ -f /lib/arm-linux-gnueabi/$i ] && cp /lib/arm-linux-gnueabi/$i $libdir && cp /lib/arm-linux-gnueabi/$i $libdir2 && continue || echo "Failed at " $i && return 1
 	done
 }
 
-- 
1.7.10.4



More information about the CRIU mailing list