Skip to content

tests/acceptance: Allow to overwrite smp and memory values set by `avocado_qemu.LinuxTest`

Goal

A test class which inherit from avocado_qemu.LinuxTest should be able to overwrite the default smp and memory size values.

Technical details

The VM launched by the avocado_qemu.LinuxTest have SMP 2 and 1024 Mib of memory by default. If a inherited class wants to overwrite them, it needs to call self.vm.add_args("-smp", "VALUE1", "-m", "VALUE2") somewhere. Even though the resulting command-line will contain -smp and -m twice.

Those values are hard-coded in the setUp(). Transform them intro class properties so they can be overwritten.

Additional information

Refer to the discussion in https://lore.kernel.org/qemu-devel/20210621080824.789274-1-eric.auger@redhat.com/

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information