kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: lvivier@redhat.com, thuth@redhat.com, david@redhat.com,
	drjones@redhat.com, pbonzini@redhat.com, cohuck@redhat.com
Subject: [kvm-unit-tests RFC 0/2] scripts: Fix accel handling
Date: Thu, 18 Mar 2021 12:44:58 +0000	[thread overview]
Message-ID: <20210318124500.45447-1-frankja@linux.ibm.com> (raw)

When running on a system without KVM but with a /dev/kvm file or when
/dev/kvm has the wrong permissions we will think that we have the kvm
accelerator because we only check if /dev/kvm exists. To fix that we
instead start a qemu with the kvm accel and check the exit value we
can check if kvm is available.

Also we only compare the accel specified in unittests.conf with the
env ACCEL. That won't help if we don't have kvm but a test has KVM as
a requirement in unittests.conf.

My bash knowledge is rather limited, so maybe there's a better
solution?

Janosch Frank (2):
  scripts: Check kvm availability by asking qemu
  scripts: Set ACCEL in run_tests.sh if empty

 arm/run               |  4 +--
 powerpc/run           |  4 +--
 run_tests.sh          |  6 +++++
 s390x/run             | 10 ++++---
 scripts/accel.bash    | 63 +++++++++++++++++++++++++++++++++++++++++++
 scripts/arch-run.bash | 63 ++-----------------------------------------
 scripts/runtime.bash  |  2 +-
 x86/run               |  4 +--
 8 files changed, 85 insertions(+), 71 deletions(-)
 create mode 100644 scripts/accel.bash

-- 
2.27.0


             reply	other threads:[~2021-03-18 12:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 12:44 Janosch Frank [this message]
2021-03-18 12:44 ` [kvm-unit-tests RFC 1/2] scripts: Check kvm availability by asking qemu Janosch Frank
2021-03-18 14:18   ` Andrew Jones
2021-03-18 15:31   ` Andrew Jones
2021-03-18 15:39     ` Janosch Frank
2021-03-24 14:11     ` Janosch Frank
2021-03-18 12:45 ` [kvm-unit-tests RFC 2/2] scripts: Set ACCEL in run_tests.sh if empty Janosch Frank
2021-03-18 15:42   ` Andrew Jones

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=20210318124500.45447-1-frankja@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=thuth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).