pseries: disable migration-test if /dev/kvm cannot be used
commit1ee5e144ea6bed4afab8c28f1c552c82ef56bc95
authorLaurent Vivier <lvivier@redhat.com>
Wed, 20 Nov 2019 17:09:55 +0000 (20 18:09 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 17 Dec 2019 08:05:23 +0000 (17 09:05 +0100)
treeee87c1125b43ac99f4714ce4849a9af89fc5d228
parenteca3a945234a5f0a499860dd11df64b5f1a2e0a5
pseries: disable migration-test if /dev/kvm cannot be used

On ppc64, migration-test only works with kvm_hv, and we already
have a check to verify the module is loaded.

kvm_hv module can be loaded in memory and /sys/module/kvm_hv exists,
but on some systems (like build systems) /dev/kvm can be missing
(by administrators choice).

And as kvm_hv exists test-migration is started but QEMU falls back to
TCG because it cannot be used:

    Could not access KVM kernel module: No such file or directory
    failed to initialize KVM: No such file or directory
    Back to tcg accelerator

And as the test is done with TCG, it fails.

As for s390x, we must check for the existence and the access rights
of /dev/kvm.

Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20191120170955.242900-1-lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/migration-test.c