Skip to contentSkip to conversation

tests/avocado: require netdev 'user' for kvm_xen_guest

PATCH In review John Snow 2 participants 3 messages Apr 13, 2023 – Apr 14, 2023 KVM

lore
Share & tools
lore

John Snow

author
#0 lore raw

PATCH 1/1 tests/avocado: require netdev 'user' for kvm_xen_guest

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)
---
 tests/avocado/kvm_xen_guest.py | 1 +
 1 file changed, 1 insertion(+)
tests/avocado/kvm_xen_guest.py +1 -0
index 5391283113..171274bc4c 100644
@@ -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()
 
Signature · 1 line
2.39.2
author
#1 lore raw
Quoted 5 lines · John Snow

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

Quoted 21 lines
Fixes c8cb603293fd (tests/avocado: Test Xen guest support under KVM)
---
 tests/avocado/kvm_xen_guest.py | 1 +
 1 file changed, 1 insertion(+)
tests/avocado/kvm_xen_guest.py +1 -1
index 5391283113..171274bc4c 100644
@@ -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

Reviewed-by on v1 1/1
#2 lore raw
In reply to John Snow
Quoted 16 lines · John Snow

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)
---
 tests/avocado/kvm_xen_guest.py | 1 +
 1 file changed, 1 insertion(+)
tests/avocado/kvm_xen_guest.py +0 -0
index 5391283113..171274bc4c 100644

tests/avocado/kvm_xen_guest.py def get_asset(self, name, sha1): · line 51

Quoted 7 lines
tests/avocado/kvm_xen_guest.py +1 -0
@@ -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()
 

thanks
-- PMM