]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/vm: Let kvm_available() work in cross environments
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 13 Oct 2018 00:40:31 +0000 (02:40 +0200)
committerFam Zheng <famz@redhat.com>
Fri, 26 Oct 2018 14:03:21 +0000 (22:03 +0800)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20181013004034.6968-7-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
scripts/qemu.py

index 9fc0be48283f3d296494555205ec7f2bb6d6b433..bcd24aad82e4c3e5323e9597fa00af8b28d12162 100644 (file)
@@ -27,6 +27,8 @@ LOG = logging.getLogger(__name__)
 
 
 def kvm_available(target_arch=None):
+    if target_arch and target_arch != os.uname()[4]:
+        return False
     return os.access("/dev/kvm", os.R_OK | os.W_OK)