All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: Laurent Vivier <lvivier@redhat.com>
Subject: [PULL 06/10] pseries: disable migration-test if /dev/kvm cannot be used
Date: Thu, 12 Dec 2019 19:54:20 +0100	[thread overview]
Message-ID: <20191212185424.4675-7-thuth@redhat.com> (raw)
In-Reply-To: <20191212185424.4675-1-thuth@redhat.com>

From: Laurent Vivier <lvivier@redhat.com>

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index ebd77a581a..a5343fdc66 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -1349,7 +1349,8 @@ int main(int argc, char **argv)
      * some reason)
      */
     if (g_str_equal(qtest_get_arch(), "ppc64") &&
-        access("/sys/module/kvm_hv", F_OK)) {
+        (access("/sys/module/kvm_hv", F_OK) ||
+         access("/dev/kvm", R_OK | W_OK))) {
         g_test_message("Skipping test: kvm_hv not available");
         return g_test_run();
     }
-- 
2.18.1



  parent reply	other threads:[~2019-12-12 18:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 18:54 [PULL 00/10] Bluetooth removal, and qtest & misc patches Thomas Huth
2019-12-12 18:54 ` [PULL 01/10] hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev Thomas Huth
2019-12-12 18:54 ` [PULL 02/10] hw/usb: Remove the USB bluetooth dongle device Thomas Huth
2019-12-12 18:54 ` [PULL 03/10] Remove the core bluetooth code Thomas Huth
2019-12-12 18:54 ` [PULL 04/10] Remove libbluetooth / bluez from the CI tests Thomas Huth
2019-12-12 18:54 ` [PULL 05/10] tests: fix modules-test 'duplicate test case' error Thomas Huth
2019-12-12 18:54 ` Thomas Huth [this message]
2019-12-12 18:54 ` [PULL 07/10] hw/misc/ivshmem: Bury dead legacy INTx code Thomas Huth
2019-12-12 18:54 ` [PULL 08/10] glib: use portable g_setenv() Thomas Huth
2019-12-12 18:54 ` [PULL 09/10] tests/Makefile: Fix check-report.* targets shown in check-help Thomas Huth
2019-12-12 18:54 ` [PULL 10/10] tests: use g_test_rand_int Thomas Huth
2019-12-16 10:27 ` [PULL 00/10] Bluetooth removal, and qtest & misc patches Peter Maydell
2019-12-16 12:08   ` Thomas Huth
2019-12-16 12:29     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191212185424.4675-7-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.