All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/acceptance: Allow overwrite smp and memory
@ 2021-08-02 22:22 Ahmed Abouzied
  2021-08-10 17:30 ` Ahmed Abouzied
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ahmed Abouzied @ 2021-08-02 22:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ahmed Abouzied, philmd, wainersm, crosa

Removes the hard-coded values in setUp(). Class inheriting from
avocado_qemu.LinuxTest can overwrite the default smp and memory instead.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 2c4fef3e14..2639b89c84 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
     distro = None
     username = 'root'
     password = 'password'
+    smp = '2'
+    memory = '1024'
 
     def _set_distro(self):
         distro_name = self.params.get(
@@ -471,8 +473,8 @@ def _set_distro(self):
     def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
         super(LinuxTest, self).setUp()
         self._set_distro()
-        self.vm.add_args('-smp', '2')
-        self.vm.add_args('-m', '1024')
+        self.vm.add_args('-smp', self.smp)
+        self.vm.add_args('-m', self.memory)
         # The following network device allows for SSH connections
         self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
                          '-device', '%s,netdev=vnet' % network_device_type)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] tests/acceptance: Allow overwrite smp and memory
  2021-08-02 22:22 [PATCH] tests/acceptance: Allow overwrite smp and memory Ahmed Abouzied
@ 2021-08-10 17:30 ` Ahmed Abouzied
  2022-04-20 10:37   ` Thomas Huth
  2021-08-10 19:18 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
  2021-08-16 17:36 ` [PATCH] " Wainer dos Santos Moschetta
  2 siblings, 1 reply; 6+ messages in thread
From: Ahmed Abouzied @ 2021-08-10 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]

ping

Just pinging about this little patch. Patchew link here:
https://patchew.org/QEMU/20210802222257.50946-1-email@aabouzied.com/.

Best regards,
Ahmed Abouzied

On Tue, Aug 3, 2021 at 12:24 AM Ahmed Abouzied <email@aabouzied.com> wrote:

> Removes the hard-coded values in setUp(). Class inheriting from
> avocado_qemu.LinuxTest can overwrite the default smp and memory instead.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
> Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
> ---
>  tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py
> b/tests/acceptance/avocado_qemu/__init__.py
> index 2c4fef3e14..2639b89c84 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
>      distro = None
>      username = 'root'
>      password = 'password'
> +    smp = '2'
> +    memory = '1024'
>
>      def _set_distro(self):
>          distro_name = self.params.get(
> @@ -471,8 +473,8 @@ def _set_distro(self):
>      def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
>          super(LinuxTest, self).setUp()
>          self._set_distro()
> -        self.vm.add_args('-smp', '2')
> -        self.vm.add_args('-m', '1024')
> +        self.vm.add_args('-smp', self.smp)
> +        self.vm.add_args('-m', self.memory)
>          # The following network device allows for SSH connections
>          self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0
> -:22',
>                           '-device', '%s,netdev=vnet' %
> network_device_type)
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2618 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH-for-6.2] tests/acceptance: Allow overwrite smp and memory
  2021-08-02 22:22 [PATCH] tests/acceptance: Allow overwrite smp and memory Ahmed Abouzied
  2021-08-10 17:30 ` Ahmed Abouzied
@ 2021-08-10 19:18 ` Philippe Mathieu-Daudé
  2021-08-10 19:28   ` Philippe Mathieu-Daudé
  2021-08-16 17:36 ` [PATCH] " Wainer dos Santos Moschetta
  2 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-08-10 19:18 UTC (permalink / raw)
  To: Ahmed Abouzied, qemu-devel; +Cc: Willian Rampazzo, wainersm, crosa

On 8/3/21 12:22 AM, Ahmed Abouzied wrote:
> Removes the hard-coded values in setUp(). Class inheriting from
> avocado_qemu.LinuxTest can overwrite the default smp and memory instead.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
> Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
> ---
>  tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index 2c4fef3e14..2639b89c84 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
>      distro = None
>      username = 'root'
>      password = 'password'
> +    smp = '2'
> +    memory = '1024'
>  
>      def _set_distro(self):
>          distro_name = self.params.get(
> @@ -471,8 +473,8 @@ def _set_distro(self):
>      def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
>          super(LinuxTest, self).setUp()
>          self._set_distro()
> -        self.vm.add_args('-smp', '2')

I don't understand why we use 2 as default value, but this is unrelated
to this patch, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> -        self.vm.add_args('-m', '1024')
> +        self.vm.add_args('-smp', self.smp)
> +        self.vm.add_args('-m', self.memory)
>          # The following network device allows for SSH connections
>          self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
>                           '-device', '%s,netdev=vnet' % network_device_type)
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH-for-6.2] tests/acceptance: Allow overwrite smp and memory
  2021-08-10 19:18 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
@ 2021-08-10 19:28   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-08-10 19:28 UTC (permalink / raw)
  To: Ahmed Abouzied, qemu-devel; +Cc: Willian Rampazzo, wainersm, crosa

Subject: "Allow overwrite default smp and memsize command line options"?

On 8/10/21 9:18 PM, Philippe Mathieu-Daudé wrote:
> On 8/3/21 12:22 AM, Ahmed Abouzied wrote:
>> Removes the hard-coded values in setUp(). Class inheriting from
>> avocado_qemu.LinuxTest can overwrite the default smp and memory instead.
>>
>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
>> Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
>> ---
>>  tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
>> index 2c4fef3e14..2639b89c84 100644
>> --- a/tests/acceptance/avocado_qemu/__init__.py
>> +++ b/tests/acceptance/avocado_qemu/__init__.py
>> @@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
>>      distro = None
>>      username = 'root'
>>      password = 'password'
>> +    smp = '2'
>> +    memory = '1024'
>>  
>>      def _set_distro(self):
>>          distro_name = self.params.get(
>> @@ -471,8 +473,8 @@ def _set_distro(self):
>>      def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
>>          super(LinuxTest, self).setUp()
>>          self._set_distro()
>> -        self.vm.add_args('-smp', '2')
> 
> I don't understand why we use 2 as default value, but this is unrelated
> to this patch, so:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
>> -        self.vm.add_args('-m', '1024')
>> +        self.vm.add_args('-smp', self.smp)
>> +        self.vm.add_args('-m', self.memory)
>>          # The following network device allows for SSH connections
>>          self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
>>                           '-device', '%s,netdev=vnet' % network_device_type)
>>
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tests/acceptance: Allow overwrite smp and memory
  2021-08-02 22:22 [PATCH] tests/acceptance: Allow overwrite smp and memory Ahmed Abouzied
  2021-08-10 17:30 ` Ahmed Abouzied
  2021-08-10 19:18 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
@ 2021-08-16 17:36 ` Wainer dos Santos Moschetta
  2 siblings, 0 replies; 6+ messages in thread
From: Wainer dos Santos Moschetta @ 2021-08-16 17:36 UTC (permalink / raw)
  To: Ahmed Abouzied, qemu-devel; +Cc: philmd, crosa

Hi Ahmed,

Sorry for taking longer to reply you as I just returned from vacation.

On 8/2/21 7:22 PM, Ahmed Abouzied wrote:
> Removes the hard-coded values in setUp(). Class inheriting from
> avocado_qemu.LinuxTest can overwrite the default smp and memory instead.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
Thanks for working on that issue!
> Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
> ---
>   tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)

I would change the patch's subject as suggested by Philippe in another 
email. Apart from that, the change looks good to me. So:

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

>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index 2c4fef3e14..2639b89c84 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
>       distro = None
>       username = 'root'
>       password = 'password'
> +    smp = '2'
> +    memory = '1024'
>   
>       def _set_distro(self):
>           distro_name = self.params.get(
> @@ -471,8 +473,8 @@ def _set_distro(self):
>       def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
>           super(LinuxTest, self).setUp()
>           self._set_distro()
> -        self.vm.add_args('-smp', '2')
> -        self.vm.add_args('-m', '1024')
> +        self.vm.add_args('-smp', self.smp)
> +        self.vm.add_args('-m', self.memory)
>           # The following network device allows for SSH connections
>           self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
>                            '-device', '%s,netdev=vnet' % network_device_type)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tests/acceptance: Allow overwrite smp and memory
  2021-08-10 17:30 ` Ahmed Abouzied
@ 2022-04-20 10:37   ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2022-04-20 10:37 UTC (permalink / raw)
  To: Ahmed Abouzied, qemu-devel
  Cc: Philippe Mathieu-Daudé, Beraldo Leal, wainersm, crosa

On 10/08/2021 19.30, Ahmed Abouzied wrote:
> ping
> 
> Just pinging about this little patch. Patchew link here: 
> https://patchew.org/QEMU/20210802222257.50946-1-email@aabouzied.com/ 

Sorry, seems like this completely fell through the cracks ... since nobody 
else picked this up yet, I've now put it into my current pull request, so 
that the issue should finally get resolved now.

  Thomas

> On Tue, Aug 3, 2021 at 12:24 AM Ahmed Abouzied <email@aabouzied.com 
> <mailto:email@aabouzied.com>> wrote:
> 
>     Removes the hard-coded values in setUp(). Class inheriting from
>     avocado_qemu.LinuxTest can overwrite the default smp and memory instead.
> 
>     Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
>     <https://gitlab.com/qemu-project/qemu/-/issues/453>
>     Signed-off-by: Ahmed Abouzied <email@aabouzied.com
>     <mailto:email@aabouzied.com>>
>     ---
>       tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
>       1 file changed, 4 insertions(+), 2 deletions(-)
> 
>     diff --git a/tests/acceptance/avocado_qemu/__init__.py
>     b/tests/acceptance/avocado_qemu/__init__.py
>     index 2c4fef3e14..2639b89c84 100644
>     --- a/tests/acceptance/avocado_qemu/__init__.py
>     +++ b/tests/acceptance/avocado_qemu/__init__.py
>     @@ -441,6 +441,8 @@ class LinuxTest(Test, LinuxSSHMixIn):
>           distro = None
>           username = 'root'
>           password = 'password'
>     +    smp = '2'
>     +    memory = '1024'
> 
>           def _set_distro(self):
>               distro_name = self.params.get(
>     @@ -471,8 +473,8 @@ def _set_distro(self):
>           def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
>               super(LinuxTest, self).setUp()
>               self._set_distro()
>     -        self.vm.add_args('-smp', '2')
>     -        self.vm.add_args('-m', '1024')
>     +        self.vm.add_args('-smp', self.smp)
>     +        self.vm.add_args('-m', self.memory)
>               # The following network device allows for SSH connections
>               self.vm.add_args('-netdev',
>     'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
>                                '-device', '%s,netdev=vnet' %
>     network_device_type)
>     -- 
>     2.25.1
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-20 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 22:22 [PATCH] tests/acceptance: Allow overwrite smp and memory Ahmed Abouzied
2021-08-10 17:30 ` Ahmed Abouzied
2022-04-20 10:37   ` Thomas Huth
2021-08-10 19:18 ` [PATCH-for-6.2] " Philippe Mathieu-Daudé
2021-08-10 19:28   ` Philippe Mathieu-Daudé
2021-08-16 17:36 ` [PATCH] " Wainer dos Santos Moschetta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.