e code
> * have a proper place for the module's own unittests
> * apply a more consistent style
> * generate documentation
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> configure | 1 +
>
ts that would not inherit
> directly from "avocado.Test". This is not necessary anymore,
> and because of that the boiler plate statements can now be removed.
>
> Reference:
> https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writer
This change adds the simplest possible migration test. Beyond the test
purpose itself it's also useful to exercise the multi virtual machines
capabilities from base avocado qemu test class.
Signed-off-by: Cleber Rosa
Signed-off-by: Caio Carrara
---
tests/acceptance/migration.py
tests and test cases that can be added, but I'm assuming
this patch is complete enough and other series can be sent after
covering the other cases.
Caio Carrara (2):
tests.acceptance: adds multi vm capability for acceptance tests
tests.acceptance: adds simple migration test
do
m in tests will not be broken by this change since
it keeps a property called vm in the base test class. This property only
calls the new method `get_vm` with default parameters (no args and
'default' as machine name).
Signed-off-by: Caio Carrara
---
docs/devel/testing.rst
Hi, Wainer.
On Mon, Jan 28, 2019 at 05:42:24PM -0200, Wainer dos Santos Moschetta wrote:
>
> On 01/28/2019 03:47 PM, Caio Carrara wrote:
> > This change adds the possibility to write acceptance tests with multi
> > virtual machine support. It's done keeping the v
From: Cleber Rosa
This is the simplest possible migration test, exercising the multi
VM capabilities of the test class.
Signed-off-by: Cleber Rosa
---
tests/acceptance/migration.py | 45 +++
1 file changed, 45 insertions(+)
create mode 100644 tests/acceptance/m
dead code".
There are more tests and test cases that can be added, but I'm assuming
this patch is complete enough and other series can be sent after
covering the other cases.
Caio Carrara (1):
tests.acceptance: adds multi vm capability for acceptance tests
Cleber Rosa (1):
Acceptan
m in tests will not be broken by this change since
it keeps a property called vm in the base test class. This property only
calls the new method `get_vm` with default parameters (no args and
'default' as machine name).
Signed-off-by: Caio Carrara
---
docs/devel/testing.rst
t the one set with set_console() works
> correctly.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
> tests/acceptance/boot_linux_console.py | 20
> 2 files changed, 21 insertions(+), 1 dele
un -t machine:malta tests/acceptance
> $ avocado run -t endian:big tests/acceptance
>
> Signed-off-by: Philippe Mathieu-Daudé
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
> scripts/qemu.py
On Thu, Jan 17, 2019 at 01:56:26PM -0500, Cleber Rosa wrote:
> Just like the previous tests, boots a Linux kernel on an arm target
> using the virt machine.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
&
the behavior of set_console() now flags the intention
> to add a console device on launch(), and if no explicit device type is
> given, and there's no definition on CONSOLE_DEV_TYPES, the "-serial"
> is going to be added to the QEMU command line, instead of rais
On Thu, Jan 17, 2019 at 01:56:24PM -0500, Cleber Rosa wrote:
> Just like the previous tests, boots a Linux kernel on a ppc64 target
> using the pseries machine.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
On Thu, Jan 17, 2019 at 01:56:11PM -0500, Cleber Rosa wrote:
> Even when the launch of QEMU succeeds, it's useful to have the command
> line recorded.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> scripts/qemu.py | 1 +
> 1 file changed, 1 inse
default CPU (cortex-a15).
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
> tests/acceptance/boot_linux_console.py | 20
> 2 files changed, 21 insertions(+), 1 deletion(-)
>
{...}
>
-
is test by the use of the "arch:mips" tags.
>
> Alternatively, this test can be run using:
>
> $ avocado run -t arch:mips64el tests/acceptance
> $ avocado run -t machine:malta tests/acceptance
>
> Signed-off-by: Philippe Mathieu-Daudé
> Signed-off-by: Cle
eptance
> $ avocado run -t machine:clipper tests/acceptance
>
> Signed-off-by: Philippe Mathieu-Daudé
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
> scripts/qemu.py| 1 -
> te
gt; Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> tests/acceptance/boot_linux_console.py | 11 +++
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tests/acceptance/boot_linux_console.py
> b/tests/acceptance/boot_linux_console.py
&g
On Thu, Jan 17, 2019 at 01:56:13PM -0500, Cleber Rosa wrote:
> Making it clear what is returned by this utility function.
>
> Signed-off-by: Cleber Rosa
> Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Caio Carrara
> ---
> tests/acceptance/avocado_qemu/__init__.py
can always choose a different output by setting the AVOCADO_SHOW
> variable.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> .travis.yml| 2 +-
> tests/Makefile.include | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a
On Thu, Jan 17, 2019 at 01:56:20PM -0500, Cleber Rosa wrote:
> This introduces a utility method that monitors the console device and
> looks for either a message that signals the test success or failure.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
>
On Thu, Jan 17, 2019 at 01:56:19PM -0500, Cleber Rosa wrote:
> To the stock Fedora 29 kernel, from the Fedora 28. New tests will be
> added using the 29 kernel, so for consistency, let's also update it
> here.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
>
do run aarch64.py
>
> The target binary selection mechanism will attempt to find a binary
> such as "aarch64-softmmu/qemu-system-aarch64".
>
> At this time, no provision is made to cancel the execution of tests if
> the arch parameter given (manually) does not
64
>
> This means that it can be filtered (out) when no x86_64 target is
> available. At the same time, tests that don't have a "arch:" tag,
> will not be filtered out.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> tests/Makefile.
hat text was moved to the top level docs directory, the
> reference was not updated.
>
> Signed-off-by: Cleber Rosa
Reviewed-by: Caio Carrara
> ---
> docs/devel/testing.rst | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/docs/devel/tes
> default=pick_default_qemu_bin(self.arch))
Since it was used the named argument in function declaration I think
it's more consistent also use the argument name here in the function
call: `pick_default_qemu_bin(arch=self.arch)`
> if self.qemu_bin is None:
> self.cancel("No QEMU binary defined or found in the source tree")
> self.vm = QEMUMachine(self.qemu_bin)
> --
> 2.20.1
>
Thanks,
--
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarr...@redhat.com
m in tests will not be broken by this change since
it keeps a property called vm in the base test class. This property only
calls the new method `get_vm` with default parameters (no args and
'default' as machine name).
Signed-off-by: Caio Carrara
---
docs/devel/testing.rst
al testing only because the list of
> expected
> +unavailable features depend on the actual host CPU knowledge.
> +"""
> +expected_cpu = 'Cascadelake-Server'
> +expected_unavailable_features = ["hle", "rtm",
casts in the code will keep
> working for all variants.
>
> A simple test script (tests/acceptance/virtio_version.py) is
> included, to check if the new device types are equivalent to
> using the `disable-legacy` and `disable-modern` options.
>
> Acked-by: Andrea Bolognani
&g
Hi Wainer,
Thanks for your reply. I pretty much agreed with most of it. I just
added a comment about that new method that is not used anywere.
On Thu, Nov 29, 2018 at 10:45:33AM -0200, Wainer dos Santos Moschetta wrote:
>
> On 11/26/2018 10:58 AM, Caio Carrara wrote:
> > On Wed, Nov
On Tue, Nov 27, 2018 at 03:02:03PM -0500, Cleber Rosa wrote:
>
>
> On 11/27/18 2:00 PM, Caio Carrara wrote:
> > Hi, Cleber.
> >
> > On Tue, Nov 27, 2018 at 05:50:34AM -0500, Cleber Rosa wrote:
> >> This is a simple move of Python code that wraps common QEMU
&
lable
> import subprocess
> import hashlib
> import optparse
> @@ -28,6 +26,13 @@ import shutil
> import multiprocessing
> import traceback
>
> +THIS_DIR = os.path.dirname(os.path.abspath(__file__))
> +TOP_DIR = os.path.dirname(os.path.dirname(THIS_DIR))
> +PYTHON_MODULE_PATH = os.path.join(TOP_DIR, 'python')
> +sys.path.append(PYTHON_MODULE_PATH)
> +
> +from qemu import QEMUMachine, kvm_available
> +
> SSH_KEY = open(os.path.join(os.path.dirname(__file__),
> "..", "keys", "id_rsa")).read()
> SSH_PUB_KEY = open(os.path.join(os.path.dirname(__file__),
> --
> 2.19.1
>
Thanks,
--
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarr...@redhat.com
On Tue, Nov 27, 2018 at 11:06:17AM -0200, Eduardo Habkost wrote:
> On Tue, Nov 27, 2018 at 10:56:21AM -0200, Caio Carrara wrote:
> > Hello, Eduardo.
> >
> > Just some minor comments regarding the Python code.
> >
> [...]
> > > +def devtype_implements(vm,
; +self.check_all_variants('virtio-scsi-pci', VIRTIO_SCSI)
> +# virtio-9p requires 'fsdev' parameter
> +#self.check_all_variants('virtio-9p-pci', VIRTIO_9P)
> +
> +def check_modern_only(self, qemu_devtype, virtio_devid):
> +"""Check if a modern-only virtio device type behaves as expected"""
> +# Force modern mode:
> +dev_modern,_ = self.run_device(qemu_devtype,
> +
> 'disable-modern=off,disable-legacy=on')
> +self.assert_devids(dev_modern, pci_modern_device_id(virtio_devid),
> + non_transitional=True)
> +
> +# No options: should be modern anyway
> +dev_no_opts,ifaces = self.run_device(qemu_devtype)
> +self.assertEqual(dev_modern, dev_no_opts)
> +
> +self.assertIn('conventional-pci-device', ifaces)
> +self.assertIn('pci-express-device', ifaces)
> +
> +def test_modern_only_devs(self):
> +self.check_modern_only('virtio-vga', VIRTIO_GPU)
> +self.check_modern_only('virtio-gpu-pci', VIRTIO_GPU)
> +self.check_modern_only('virtio-mouse-pci', VIRTIO_INPUT)
> +self.check_modern_only('virtio-tablet-pci', VIRTIO_INPUT)
> +self.check_modern_only('virtio-keyboard-pci', VIRTIO_INPUT)
> --
> 2.18.0.rc1.1.g3f1ff2140
>
Thanks,
--
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarr...@redhat.com
m.shutdown()
>
> self.vm.set_qmp_monitor(disabled=False)
> self.vm._args.remove('--foobar') # Hack
> self.vm.launch()
> res = self.vm.command('human-monitor-command',
> command_line='info version'
x27;none']
if self._with_qmp:
args.extend(['-chardev', self._get_moncdev_args(),
'-mon', 'chardev=mon,mode=control'])
if self._machine is not None:
```
Does it make sense?
>
{...}
>
> --
> Eduardo
--
Caio Carrara
Software Engineer, Virt Team - Red Hat
ccarr...@redhat.com
thod). AFIK we're moving
towards only Py3 support on the acceptance tests, right? The current
behavior (error) is the expected?
Since the comment above is just for clarification and not a blocking issue:
Reviewed-by: Caio Carrara
Tested-by: Caio Carrara
--
Caio Carrara
Software Engineer, Virt Team
Red Hat
ccarr...@redhat.com
ain the exact environment that
> tests may require.
>
> There's one current caveat: it requires Python 3, as it's based on the
> venv module. This was based on some discussions and perception about
> standardizing on Python 3, but can easily be made to accommodate Python
>
equirements.txt b/tests/venv-requirements.txt
> new file mode 100644
> index 000000..d39f9d1576
> --- /dev/null
> +++ b/tests/venv-requirements.txt
> @@ -0,0 +1,3 @@
> +# Add Python module requirements, one per line, to be installed
> +# in the tests/venv Python virtual environment. For more info,
> +# refer to: https://pip.pypa.io/en/stable/user_guide/#id1
>
--
Caio Carrara
Software Engineer, Virt Team
Red Hat
ccarr...@redhat.com
VENV_DIR)
>>> +
>>> # Consolidated targets
>>>
>>> .PHONY: check-qapi-schema check-qtest check-unit check check-clean
>>> @@ -1030,6 +1049,7 @@ check-clean:
>>> rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
>>> rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST),
>>> $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
>>> rm -f tests/test-qapi-gen-timestamp
>>> + rm -rf $(TESTS_VENV_DIR)
>>>
>>> clean: check-clean
>>>
>>> diff --git a/tests/venv-requirements.txt b/tests/venv-requirements.txt
>>> new file mode 100644
>>> index 00..d39f9d1576
>>> --- /dev/null
>>> +++ b/tests/venv-requirements.txt
>>> @@ -0,0 +1,3 @@
>>> +# Add Python module requirements, one per line, to be installed
>>> +# in the tests/venv Python virtual environment. For more info,
>>> +# refer to: https://pip.pypa.io/en/stable/user_guide/#id1
>>>
>>
>> Tested-by: Philippe Mathieu-Daudé
>
--
Caio Carrara
Software Engineer, Virt Team
Red Hat
ccarr...@redhat.com
41 matches
Mail list logo