diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-10-13 02:40:31 +0200 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2018-10-26 22:03:21 +0800 |
commit | 67a52f34569cb70a54d3b3bb1c0dc7e7a280ca54 (patch) | |
tree | 05752654a168b8454e398937e612c9e28cb45148 /scripts/qemu.py | |
parent | 31719c37f500a62aeb739ddeea87db89e8c2fcb1 (diff) | |
download | qemu-67a52f34569cb70a54d3b3bb1c0dc7e7a280ca54.zip qemu-67a52f34569cb70a54d3b3bb1c0dc7e7a280ca54.tar.gz qemu-67a52f34569cb70a54d3b3bb1c0dc7e7a280ca54.tar.bz2 |
tests/vm: Let kvm_available() work in cross environments
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>
Diffstat (limited to 'scripts/qemu.py')
-rw-r--r-- | scripts/qemu.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/qemu.py b/scripts/qemu.py index 9fc0be4..bcd24aa 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) |