public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Support running custom commands in VM
@ 2023-02-08 15:45 Uladzimir Bely
  2023-02-08 15:45 ` [PATCH v2 1/9] testsuite: Fix failing hostname service in qemu guest Uladzimir Bely
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Uladzimir Bely @ 2023-02-08 15:45 UTC (permalink / raw)
  To: isar-users

VM run tests implementation in Isar testsuite allows only parsing
virtual machine boot logs, so the functionality is limited.

This patchset additionally allows to run custom commands on VM
that runs in qemu that allows to implement any custom tests.

The concept is the following.

For running custom tests SSH is used. So:

 - SSH server on machine should be configured, so `sshd-regen-keys`
package needs to be installed in the image.

 - Ethernet interface on machine should be automatically brought up
to make host-to-vm port forwarding working.

 - User in VM we use to connect via SSH should have public SSH key
in their `~/.ssh/` directory preinstalled.

 - Since base isar image don't have this included, custom image name
for vm run tests should be supported. This also allows to make reusing
Isar testsuite in downstream simpler.

Changes since v1:
 - Patches "meta-isar: Fix PCI bus initialization in qemuarm machine"
and "testsuite: Use random free port for qemu SSH forwarding" are
excluded from patchset since they are already merged.
 - User `ci` creation/configuration is moved to a separate package so
now it can be simply removed from target using apt. No new user flags
are required anymore.
 - In addition to simple commands (cmd="<command>"), running custom
local scripts (script="<script>.sh") on remote machine is implemented.
 - Appropriate documentation was added.
 - patchset rebased on top of "Add developers test" patchset which
is supposed to be merged earlier.

Notes:
 - Mixing positional and named arguments, e.g. 
|    self.vm_start('arm','bookworm',
|        image='isar-image-ci', script='test_getty_target.sh')
is still here, since it's easy to read.

Uladzimir Bely (9):
  testsuite: Fix failing hostname service in qemu guest
  testsuite: Add SSH key pair for using in CI
  meta-isar: Add a recipe that configures ci user
  meta-isar: Use a separate image recipe in CI
  testsuite: Allow custom image names in start_vm.py
  testsuite: Support running custom commands in VM
  testsuite: Support running custom scripts in VM
  testsuite: Run custom commands and scripts on some qemu targets
  testsuite: Update testsuite qemu-related documentation

 meta-isar/recipes-ci/images/isar-image-ci.bb  |   9 ++
 .../isar-ci-ssh-setup/files/postinst          |  18 +++
 .../isar-ci-ssh-setup_0.1.bb                  |  22 ++++
 testsuite/README.md                           |  41 ++++++-
 testsuite/cibuilder.py                        | 105 +++++++++++++++++-
 testsuite/citest.py                           | 105 +++++++++++++++---
 testsuite/keys/ssh/id_rsa                     |  38 +++++++
 testsuite/keys/ssh/id_rsa.pub                 |   1 +
 testsuite/start_vm.py                         |  23 ++--
 testsuite/test_example_module.sh              |   5 +
 testsuite/test_getty_target.sh                |   7 ++
 11 files changed, 341 insertions(+), 33 deletions(-)
 create mode 100644 meta-isar/recipes-ci/images/isar-image-ci.bb
 create mode 100644 meta-isar/recipes-ci/isar-ci-ssh-setup/files/postinst
 create mode 100644 meta-isar/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb
 create mode 100644 testsuite/keys/ssh/id_rsa
 create mode 100644 testsuite/keys/ssh/id_rsa.pub
 create mode 100644 testsuite/test_example_module.sh
 create mode 100644 testsuite/test_getty_target.sh

-- 
2.20.1


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

end of thread, other threads:[~2023-02-21 10:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 15:45 [PATCH v2 0/9] Support running custom commands in VM Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 1/9] testsuite: Fix failing hostname service in qemu guest Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 2/9] testsuite: Add SSH key pair for using in CI Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 3/9] meta-isar: Add a recipe that configures ci user Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 4/9] meta-isar: Use a separate image recipe in CI Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 5/9] testsuite: Allow custom image names in start_vm.py Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 6/9] testsuite: Support running custom commands in VM Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 7/9] testsuite: Support running custom scripts " Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 8/9] testsuite: Run custom commands and scripts on some qemu targets Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 9/9] testsuite: Update testsuite qemu-related documentation Uladzimir Bely
2023-02-21 10:56 ` [PATCH v2 0/9] Support running custom commands in VM Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox