[CRIU] [PATCH] zdtm: autodetect the target machine

Alexander Kartashov alekskartashov at parallels.com
Wed Jan 23 07:27:58 EST 2013


Andrew Vagin pointed out that the script test/zdtm.sh may be
invoked as standalone so the variable ARCH won't be available.

This patch enables test/zdtm.sh to detect the target machine
by itself.

Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 test/zdtm.sh |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index 2c91793..2765343 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -428,6 +428,15 @@ while :; do
 	break;
 done
 
+if [ -z $ARCH ]; then
+	MACH=`uname -m`
+	if [ "$MACH" == x86_64 ]; then
+		ARCH=x86
+	fi
+
+	export ARCH
+fi
+
 if [ $# -eq 0 ]; then
 
 	check_mainstream || exit 1
-- 
1.7.10.4



More information about the CRIU mailing list