On 21/3/23 12:17, Alex Bennée wrote:
A recent attempt to let avocado run more tests on the CentOS stream
build failed because there was no gating on the multiprocess feature.
Like missing accelerators avocado should gracefully skip when the
feature is not enabled.
In this case we use the existence of the proxy device as a proxy for
multi-process support.
Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
Cc: Elena Ufimtseva <elena.ufimts...@oracle.com>
Cc: Jagannathan Raman <jag.ra...@oracle.com>
Cc: John G Johnson <john.g.john...@oracle.com>
---
tests/avocado/avocado_qemu/__init__.py | 10 ++++++++++
tests/avocado/multiprocess.py | 1 +
2 files changed, 11 insertions(+)
+ """
+ Test for the presence of the x-pci-proxy-dev which is required
+ to support multiprocess.
+ """
+ devhelp = run_cmd([self.qemu_bin,
+ '-M', 'none', '-device', 'help'])[0];
+ if devhelp.find('x-pci-proxy-dev') < 0:
+ self.cancel('no support for multiprocess device emulation')
FYI a more generic alternative to this method:
https://lore.kernel.org/qemu-devel/20200129212345.20547-14-phi...@redhat.com/
But yours just works :)