From: Thierry Parmentelat Date: Wed, 1 Sep 2010 22:04:43 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/tests X-Git-Tag: tests-5.0-15~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=368e4459c448172546b6617d58cca87f384d88bb;hp=2759a0c6d529b3aafcddd422eafb7e64ea86b7d1;p=tests.git Merge branch 'master' of ssh://git.onelab.eu/git/tests --- diff --git a/system/plcsh_stress_test.py b/system/plcsh_stress_test.py index 4a76874..ef862bc 100755 --- a/system/plcsh_stress_test.py +++ b/system/plcsh_stress_test.py @@ -79,7 +79,7 @@ def randhostname(namelengths): hostname = 'a' + randstr(namelengths['hostname1'], letters + digits + '-') + '1.' + \ 'b' + randstr(namelengths['hostname1'], letters + digits + '-') + '2.' + \ 'c' + randstr(namelengths['hostname2'], letters) - return hostname + return hostname.lower() def randpath(length): parts = [] diff --git a/system/template-qemu/qemu-start-node b/system/template-qemu/qemu-start-node index f16e8aa..4252725 100755 --- a/system/template-qemu/qemu-start-node +++ b/system/template-qemu/qemu-start-node @@ -34,11 +34,19 @@ CONFIG=qemu.conf [ -f "$CONFIG" ] || { echo "Config file for qemu $CONFIG not found in $(pwd)" ; exit 1 ; } . $CONFIG +# NOTE: check if the machine supports 64bits. We'll add -no-kqemu only +# if it does. On 32bits host, qemu-system-x86_64 doesn't accept this +# parameter (although it's there in the man page) +function is_64bits () { + return $(cat /proc/cpuinfo | grep "^flags" | grep " lm " > /dev/null) +} + + # the launcher, depending on target arch # make sure to check qemu-kill-node for consistency case $TARGET_ARCH in i386) QEMU=qemu ; ARGS="" ;; - x86_64) QEMU=qemu-system-x86_64 ; ARGS="" ;; + x86_64) QEMU=qemu-system-x86_64 ; if is_64bits; then ARGS="-no-kqemu"; else ARGS=""; fi ;; *) echo "Cannot handle TARGET_ARCH=$TARGET_ARCH"; exit 1 ;; esac