mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
tests/vm: Extract the kvm_available() handy function
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-2-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
1578466c9a
commit
b59b82eded
2 changed files with 6 additions and 2 deletions
|
@ -26,6 +26,10 @@ import tempfile
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def kvm_available(target_arch=None):
|
||||
return os.access("/dev/kvm", os.R_OK | os.W_OK)
|
||||
|
||||
|
||||
#: Maps machine types to the preferred console device types
|
||||
CONSOLE_DEV_TYPES = {
|
||||
r'^clipper$': 'isa-serial',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue