diff mbox series

[v2,27/29] tests/acceptance/migration: Default to -nodefaults

Message ID 20200129212345.20547-28-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series tests/acceptance/virtio_seg_max_adjust: Restrict it to Linux/X86 | expand

Commit Message

Philippe Mathieu-Daudé Jan. 29, 2020, 9:23 p.m. UTC
We don't need the default options to run this test.

This fixes errors when running a binary built with
--without-default-devices such:

  ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/migration.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Thomas Huth Feb. 6, 2020, 4:03 p.m. UTC | #1
On 29/01/2020 22.23, Philippe Mathieu-Daudé wrote:
> We don't need the default options to run this test.
> 
> This fixes errors when running a binary built with
> --without-default-devices such:
> 
>   ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/migration.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index a44c1ae58f..d09e5d3fe7 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -32,10 +32,12 @@ class Migration(Test):
>  
>  
>      def test_migration_with_tcp_localhost(self):
> -        source_vm = self.get_vm()
>          dest_uri = 'tcp:localhost:%u' % self._get_free_port()
>          dest_vm = self.get_vm('-incoming', dest_uri)
> +        dest_vm.add_args('-nodefaults')
>          dest_vm.launch()
> +        source_vm = self.get_vm()
> +        source_vm.add_args('-nodefaults')
>          source_vm.launch()
>          source_vm.qmp('migrate', uri=dest_uri)
>          wait.wait_for(
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Wainer dos Santos Moschetta Feb. 7, 2020, 11:57 a.m. UTC | #2
On 1/29/20 7:23 PM, Philippe Mathieu-Daudé wrote:
> We don't need the default options to run this test.
>
> This fixes errors when running a binary built with
> --without-default-devices such:
>
>    ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci


If you look at all the other acceptance tests the majority is going to 
fail with --without-default-devices. So could we do better on this problem?

Although I would prefer a solution that cover all the tests, nothing is 
wrong with this change:

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>


>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   tests/acceptance/migration.py | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index a44c1ae58f..d09e5d3fe7 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -32,10 +32,12 @@ class Migration(Test):
>   
>   
>       def test_migration_with_tcp_localhost(self):
> -        source_vm = self.get_vm()
>           dest_uri = 'tcp:localhost:%u' % self._get_free_port()
>           dest_vm = self.get_vm('-incoming', dest_uri)
> +        dest_vm.add_args('-nodefaults')
>           dest_vm.launch()
> +        source_vm = self.get_vm()
> +        source_vm.add_args('-nodefaults')
>           source_vm.launch()
>           source_vm.qmp('migrate', uri=dest_uri)
>           wait.wait_for(
diff mbox series

Patch

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index a44c1ae58f..d09e5d3fe7 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -32,10 +32,12 @@  class Migration(Test):
 
 
     def test_migration_with_tcp_localhost(self):
-        source_vm = self.get_vm()
         dest_uri = 'tcp:localhost:%u' % self._get_free_port()
         dest_vm = self.get_vm('-incoming', dest_uri)
+        dest_vm.add_args('-nodefaults')
         dest_vm.launch()
+        source_vm = self.get_vm()
+        source_vm.add_args('-nodefaults')
         source_vm.launch()
         source_vm.qmp('migrate', uri=dest_uri)
         wait.wait_for(