Skip to content

RFC scripts: Fix accel handling

Janosch Frank kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2scripts: Check kvm availability by asking qemuarm/run powerpc/run s390x/run +2 more+13 -104 replies
2/2scripts: Set ACCEL in run_tests.sh if emptyrun_tests.sh s390x/run scripts/accel.bash +2 more+77 -661 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [kvm-unit-tests RFC 0/2] scripts: Fix accel handling

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
Signature · 1 line
2.27.0