kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests RFC PATCH 0/5] arm: Add kvmtool to the runner script
@ 2021-07-02 16:31 Alexandru Elisei
  2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 1/5] lib: arm: Print test exit status on exit if chr-testdev is not available Alexandru Elisei
                   ` (4 more replies)
  0 siblings, 5 replies; 36+ messages in thread
From: Alexandru Elisei @ 2021-07-02 16:31 UTC (permalink / raw)
  To: drjones, thuth, pbonzini, lvivier, kvm-ppc, david, frankja,
	cohuck, imbrenda, linux-s390, kvm, kvmarm
  Cc: andre.przywara, maz, vivek.gautam

kvm-unit-tests has support for running arm64 tests under kvmtool since
2019. However, each test had to be run manually since the runner script was
blissfully unware of other VMMs beside qemu.

This series aims to support running all the tests automatically with
kvmtool, like it has always been possible to do with qemu by invoking:

$ ./run_tests.sh

The runner script will choose kvmtool as the VMM if the tests has been
configured with the kvmtool target.

I see several advantages to being able to use kvmtool alongside qemu:

- kvmtool is smaller and a lot easier to hack than qemu, which means it may
  be possible for developers to prefer it over qemu when adding new
  features to KVM. Being able to run all the tests reliably and
  automatically is useful in the development process.

- kvmtool runs all the tests faster than qemu (roughly 3 times faster on
  4xA53s). I think this is another nice feature for development.

- kvmtool does things differently than qemu: different memory layout,
  different uart, PMU emulation is optional, etc. This makes it a good
  testing vehicule for kvm-unit-tests.

This series is an RFC for various reasons:

- The migration tests work under kvmtool because when kvm-unit-tests
  writes something to the UART (like "Now migrate the VM, then press a key
  a key to continue...\n"), a read will return the last character that was
  written (newline, in this case). I don't know if this is a feature or a
  bug with the kvm-unit-tests UART mini-driver or with kvmtool, and I'm
  investigating it.

- I've tried to keep the changes as small as possible, but I would like
  some feedback about my approach, as I am not very familiar with bash
  scripting.

- The series needs more testing. I've only tested the patches on a
  rockpro64 with qemu and kvmtool, and on my Ryzen amd64
  machine (qemu only, --target=kvmtool is available only for arm/arm64).

TODO:

- More testing, especially on powerpc and s390x which are touched in patch #2.
- README changes to reflect kvmtool support for the runner script.
- Figure out how to handle migration tests under kvmtool.

Comments welcome and much appreciated.

Alexandru Elisei (5):
  lib: arm: Print test exit status on exit if chr-testdev is not
    available
  scripts: Rename run_qemu_status -> run_test_status
  run_tests.sh: Add kvmtool support
  scripts: Generate kvmtool standalone tests
  configure: Ignore --erratatxt when --target=kvmtool

 scripts/arch-run.bash   |  50 ++++++++++++++++--
 scripts/runtime.bash    |  94 ++++++++++++++++++++++++++++------
 scripts/mkstandalone.sh |   9 +++-
 arm/run                 | 110 ++++++++++++++++++++++++----------------
 powerpc/run             |   2 +-
 s390x/run               |   2 +-
 run_tests.sh            |  11 +++-
 configure               |  26 +++++++---
 lib/chr-testdev.h       |   1 +
 lib/arm/io.c            |  10 +++-
 lib/chr-testdev.c       |   5 ++
 11 files changed, 243 insertions(+), 77 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2021-09-09 14:41 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 16:31 [kvm-unit-tests RFC PATCH 0/5] arm: Add kvmtool to the runner script Alexandru Elisei
2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 1/5] lib: arm: Print test exit status on exit if chr-testdev is not available Alexandru Elisei
2021-07-12 16:36   ` Andrew Jones
2021-09-06 10:20     ` Alexandru Elisei
2021-09-06 10:58       ` Andrew Jones
2021-09-06 11:06         ` Alexandru Elisei
2021-07-12 16:51   ` Andre Przywara
2021-07-12 17:07     ` Andrew Jones
2021-07-12 17:12       ` Nadav Amit
2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 2/5] scripts: Rename run_qemu_status -> run_test_status Alexandru Elisei
2021-07-12 16:37   ` Andrew Jones
2021-07-13  7:45   ` Thomas Huth
2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 3/5] run_tests.sh: Add kvmtool support Alexandru Elisei
2021-07-12 16:52   ` Andre Przywara
2021-09-06 10:28     ` Alexandru Elisei
2021-09-06 11:01       ` Andrew Jones
2021-09-06 11:07         ` Alexandru Elisei
2021-09-07 10:17   ` Andrew Jones
2021-09-08 14:33     ` Alexandru Elisei
2021-09-08 15:09       ` Andrew Jones
2021-09-08 15:46         ` Alexandru Elisei
2021-09-08 15:49           ` Andrew Jones
2021-09-09 11:33             ` Alexandru Elisei
2021-09-09 12:49               ` Andrew Jones
2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 4/5] scripts: Generate kvmtool standalone tests Alexandru Elisei
2021-09-07 10:21   ` Andrew Jones
2021-09-08 15:37     ` Alexandru Elisei
2021-09-08 16:07       ` Andrew Jones
2021-09-09 11:11         ` Alexandru Elisei
2021-09-09 13:05           ` Andrew Jones
2021-09-09 13:47             ` Alexandru Elisei
2021-09-09 13:54               ` Andrew Jones
2021-09-09 14:42                 ` Alexandru Elisei
2021-07-02 16:31 ` [kvm-unit-tests RFC PATCH 5/5] configure: Ignore --erratatxt when --target=kvmtool Alexandru Elisei
2021-09-07 10:25   ` Andrew Jones
2021-09-08 16:13     ` Alexandru Elisei

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).