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>
This commit is contained in:
parent
31719c37f5
commit
67a52f3456
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user