[CRIU] [PATCH 12/20] test/zdtm.sh: introduced support for a multistrapped Debian.

alekskartashov at parallels.com alekskartashov at parallels.com
Wed Dec 12 08:34:22 EST 2012


From: Alexander Kartashov <alekskartashov at parallels.com>

* Store dynamic libraries in Debian-specific folders while contructing the root for ns tests.
* Fixed the interpreter of the script test/zdtm.sh.

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

diff --git a/Makefile b/Makefile
index 5012580..ac34f0f 100644
--- a/Makefile
+++ b/Makefile
@@ -179,6 +179,7 @@ clean:
 	$(Q) $(RM) -f ./*.bin
 	$(Q) $(RM) -f ./$(PROGRAM)
 	$(Q) $(RM) -rf ./test/dump/
+	$(Q) $(RM) -rf test/lib64 test/lib
 	$(Q) $(MAKE) -C protobuf/ clean
 	$(Q) $(MAKE) -C arch/$(ARCH)/ clean
 	$(Q) $(MAKE) -C pie/ clean
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 708d9a1..7b4d617 100644
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 ZP="zdtm/live"
 
@@ -151,7 +151,7 @@ git://git.kernel.org/pub/scm/linux/kernel/git/gorcunov/linux-cr.git
 ===================================================================
 EOF
 
-	ver_arr=(`echo ${ver_str//./ }`)
+	ver_arr=`echo ${ver_str//./ }`
 
 	[ "${ver_arr[0]}" -gt 3 ] && return 0
 	[[ "${ver_arr[0]}" -eq 3 && "${ver_arr[1]}" -ge 7 ]] && return 0
@@ -181,7 +181,9 @@ construct_root()
 		[ -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 /usr/lib64/$i ] && cp /usr/lib64/$i $libdir && continue ||
+		[ -f /lib/x86_64-linux-gnu/$i ] && cp /lib/x86_64-linux-gnu/$i $libdir && continue
+		[ -f /lib/arm-linux-gnueabi/$i ] && cp /lib/arm-linux-gnueabi/$i $libdir && continue || echo "Failed at " $i && return 1
 	done
 }
 
-- 
1.7.9.5



More information about the CRIU mailing list