Skip to content

Acceptance Test: introduce base class for Linux based tests

Cleber Rosa qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 6 repliesIn review
  2. v210 patches 42 repliesSuperseded
  3. v122 patches 63 repliesSuperseded

Changes in v3 from the cover letter

* Removed type information in docstring on python/qemu/utils.py, as that's already present on the type hints (John Snow)

* Reworded commit message about moving ssh-related methods to a auxiliary, mix-in class, and not to the base LinuxTest class (Eric Auger)

* Removed unused import of get_info_usernet_hostfwd_port on tests/acceptance/linux_ssh_mips_malta.py (Eric Auger)

* Added note on commit message about setUp() method also allowing one to define network device, which is by default, set to virtio-net (Eric Auger)

* Kept note about the network device that allows for SSH connections (Wainer Moschetta)

* Do not set up an SSH connection on tests that won't be using it (Eric Auger)

* Mention the use of a Fedora 31 guest image (Wainer Moschetta)

* Fix of SSH pubkey setup on tests/acceptance/virtiofs_submounts.py (new patch, reported by Wainer Moschetta)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11tests/acceptance/virtiofs_submounts.py: add missing accel tagtests/acceptance/virtiofs_submounts.py+1 -00 replies
2/11tests/acceptance/virtiofs_submounts.py: evaluate string not lengthtests/acceptance/virtiofs_submounts.py+1 -10 replies
3/11Python: add utility function for retrieving port redirectionpython/qemu/utils.py tests/acceptance/info_usernet.py tests/acceptance/linux_ssh_mips_malta.py +2 more+76 -301 reply
4/11Acceptance Tests: move useful ssh methods to base classtests/acceptance/avocado_qemu/__init__.py tests/acceptance/linux_ssh_mips_malta.py tests/acceptance/virtiofs_submounts.py+50 -751 reply
5/11Acceptance Tests: add port redirection for ssh by defaulttests/acceptance/avocado_qemu/__init__.py tests/acceptance/virtiofs_submounts.py+4 -50 replies
6/11Acceptance Tests: make username/password configurabletests/acceptance/avocado_qemu/__init__.py+4 -20 replies
7/11Acceptance Tests: set up SSH connection by default after boot for LinuxTesttests/acceptance/avocado_qemu/__init__.py tests/acceptance/boot_linux.py tests/acceptance/virtiofs_submounts.py+13 -111 reply
8/11tests/acceptance/virtiofs_submounts.py: remove launch_vm()tests/acceptance/virtiofs_submounts.py+5 -80 replies
9/11Acceptance Tests: add basic documentation on LinuxTest base classdocs/devel/testing.rst+26 -00 replies
10/11Acceptance Tests: introduce CPU hotplug testtests/acceptance/hotplug_cpu.py+37 -00 replies
11/11tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkeytests/acceptance/virtiofs_submounts.py+1 -13 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchWainer dos Santos MoschettaWillian RampazzoEric AugerMarc-André LureauBeraldo Leal
1/11R-b R-b R-b
2/11R-b R-b R-b
3/11R-b R-b R-b
4/11R-b R-b R-b
5/11R-b R-b R-b
6/11R-b R-b R-b
7/11R-b R-b R-b
8/11R-b R-b R-b
9/11R-b R-b R-b R-b
10/11R-b R-b R-b
11/11R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/11] Acceptance Test: introduce base class for Linux based tests

This introduces a base class for tests that need to interact with a Linux guest. It generalizes the "boot_linux.py" code, already been used by the "virtiofs_submounts.py" and also SSH related code being used by that and "linux_ssh_mips_malta.py".

While at it, a number of fixes on hopeful improvements to those tests were added.

Changes from v2:

* Removed type information in docstring on python/qemu/utils.py, as that's already present on the type hints (John Snow)

* Reworded commit message about moving ssh-related methods to a auxiliary, mix-in class, and not to the base LinuxTest class (Eric Auger)

* Removed unused import of get_info_usernet_hostfwd_port on tests/acceptance/linux_ssh_mips_malta.py (Eric Auger)

* Added note on commit message about setUp() method also allowing one to define network device, which is by default, set to virtio-net (Eric Auger)

* Kept note about the network device that allows for SSH connections (Wainer Moschetta)

* Do not set up an SSH connection on tests that won't be using it (Eric Auger)

* Mention the use of a Fedora 31 guest image (Wainer Moschetta)

* Fix of SSH pubkey setup on tests/acceptance/virtiofs_submounts.py (new patch, reported by Wainer Moschetta)

Changes from v1:

* Majority of v1 patches have been merged.

* New patches:
- Acceptance Tests: make username/password configurable
- Acceptance Tests: set up SSH connection by default after boot for LinuxTest
- tests/acceptance/virtiofs_submounts.py: remove launch_vm()

* Allowed for the configuration of the network device type (defaulting to virtio-net) [Phil]

* Fix module name typo (s/qemu.util/qemu.utils/) in the commit message [John]

* Tests based on LinuxTest will have the SSH connection already prepared

Cleber Rosa (11):
tests/acceptance/virtiofs_submounts.py: add missing accel tag tests/acceptance/virtiofs_submounts.py: evaluate string not length
Python: add utility function for retrieving port redirection Acceptance Tests: move useful ssh methods to base class Acceptance Tests: add port redirection for ssh by default Acceptance Tests: make username/password configurable Acceptance Tests: set up SSH connection by default after boot for
LinuxTest
tests/acceptance/virtiofs_submounts.py: remove launch_vm() Acceptance Tests: add basic documentation on LinuxTest base class Acceptance Tests: introduce CPU hotplug test tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey

 docs/devel/testing.rst                    | 26 +++++++++
 python/qemu/utils.py                      | 33 +++++++++++
 tests/acceptance/avocado_qemu/__init__.py | 64 ++++++++++++++++++--
 tests/acceptance/boot_linux.py            | 18 +++---
 tests/acceptance/hotplug_cpu.py           | 37 ++++++++++++
 tests/acceptance/info_usernet.py          | 29 +++++++++
 tests/acceptance/linux_ssh_mips_malta.py  | 42 +-------------
 tests/acceptance/virtiofs_submounts.py    | 71 +++--------------------
 tests/vm/basevm.py                        |  7 +--
 9 files changed, 206 insertions(+), 121 deletions(-)
 create mode 100644 python/qemu/utils.py
 create mode 100644 tests/acceptance/hotplug_cpu.py
 create mode 100644 tests/acceptance/info_usernet.py
Signature · 1 line
2.30.2