[PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest

John Snow posted 1 patch 1 year, 1 month ago
Failed in applying to current master (apply log)
tests/avocado/kvm_xen_guest.py | 1 +
1 file changed, 1 insertion(+)
[PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest
Posted by John Snow 1 year, 1 month ago
The tests will fail mysteriously with EOFError otherwise, because the VM
fails to boot and quickly disconnects from the QMP socket. Skip these
tests when we didn't compile with slirp.

Fixes: c8cb603293fd (tests/avocado: Test Xen guest support under KVM)
Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/avocado/kvm_xen_guest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py
index 5391283113..171274bc4c 100644
--- a/tests/avocado/kvm_xen_guest.py
+++ b/tests/avocado/kvm_xen_guest.py
@@ -45,6 +45,7 @@ def get_asset(self, name, sha1):
     def common_vm_setup(self):
         # We also catch lack of KVM_XEN support if we fail to launch
         self.require_accelerator("kvm")
+        self.require_netdev('user')
 
         self.vm.set_console()
 
-- 
2.39.2
Re: [PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest
Posted by Peter Maydell 1 year, 1 month ago
On Thu, 13 Apr 2023 at 22:43, John Snow <jsnow@redhat.com> wrote:
>
> The tests will fail mysteriously with EOFError otherwise, because the VM
> fails to boot and quickly disconnects from the QMP socket. Skip these
> tests when we didn't compile with slirp.
>
> Fixes: c8cb603293fd (tests/avocado: Test Xen guest support under KVM)
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/avocado/kvm_xen_guest.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py
> index 5391283113..171274bc4c 100644
> --- a/tests/avocado/kvm_xen_guest.py
> +++ b/tests/avocado/kvm_xen_guest.py
> @@ -45,6 +45,7 @@ def get_asset(self, name, sha1):
>      def common_vm_setup(self):
>          # We also catch lack of KVM_XEN support if we fail to launch
>          self.require_accelerator("kvm")
> +        self.require_netdev('user')
>
>          self.vm.set_console()
>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
Re: [PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest
Posted by John Snow 1 year, 1 month ago
On Thu, Apr 13, 2023 at 5:43 PM John Snow <jsnow@redhat.com> wrote:
>
> The tests will fail mysteriously with EOFError otherwise, because the VM
> fails to boot and quickly disconnects from the QMP socket. Skip these
> tests when we didn't compile with slirp.
>

Full disclosure: I only tested this patch in conjunction with a much
larger series that also messed around with tests, but it seemed to
work OK on my local machine in that circumstance. Didn't find any
other tests that needed this same treatment.

--js

> Fixes: c8cb603293fd (tests/avocado: Test Xen guest support under KVM)
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  tests/avocado/kvm_xen_guest.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py
> index 5391283113..171274bc4c 100644
> --- a/tests/avocado/kvm_xen_guest.py
> +++ b/tests/avocado/kvm_xen_guest.py
> @@ -45,6 +45,7 @@ def get_asset(self, name, sha1):
>      def common_vm_setup(self):
>          # We also catch lack of KVM_XEN support if we fail to launch
>          self.require_accelerator("kvm")
> +        self.require_netdev('user')
>
>          self.vm.set_console()
>
> --
> 2.39.2
>