diff mbox series

[PULL,7/9] tests/vm: Let kvm_available() work in cross environments

Message ID 20181026141529.4305-8-famz@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,1/9] tests: docker: update test-mingw for GTK+ 2.0 removal | expand

Commit Message

Fam Zheng Oct. 26, 2018, 2:15 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 9fc0be4828..bcd24aad82 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -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)