All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
@ 2024-11-13  9:43 Dmitry Frolov
  2024-11-13 21:13 ` Fabiano Rosas
  2024-11-26 18:32 ` Daniel P. Berrangé
  0 siblings, 2 replies; 11+ messages in thread
From: Dmitry Frolov @ 2024-11-13  9:43 UTC (permalink / raw)
  To: farosas, lvivier; +Cc: sdl.qemu, qemu-devel, Dmitry Frolov

Some tests need more time when qemu is built with
"--enable-asan --enable-ubsan"

As was discussed here:
https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.ru/

TIMEOUT_MULTIPLIER enviroment variable will be
a useful option, allowing non-invasive timeouts
increasing for a specific build.

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
---
 scripts/mtest2make.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
index eb01a05ddb..ff60b62724 100644
--- a/scripts/mtest2make.py
+++ b/scripts/mtest2make.py
@@ -27,7 +27,9 @@ def names(self, base):
 .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
 .speed.thorough = $(foreach s,$(sort $1), --suite $s)
 
+ifndef TIMEOUT_MULTIPLIER
 TIMEOUT_MULTIPLIER = 1
+endif
 .mtestargs = --no-rebuild -t $(TIMEOUT_MULTIPLIER)
 ifneq ($(SPEED), quick)
 .mtestargs += --setup $(SPEED)
-- 
2.43.0



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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-13  9:43 [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER Dmitry Frolov
@ 2024-11-13 21:13 ` Fabiano Rosas
  2024-11-26 17:48   ` Pierrick Bouvier
  2024-11-26 18:32 ` Daniel P. Berrangé
  1 sibling, 1 reply; 11+ messages in thread
From: Fabiano Rosas @ 2024-11-13 21:13 UTC (permalink / raw)
  To: Dmitry Frolov, lvivier; +Cc: sdl.qemu, qemu-devel, Dmitry Frolov

Dmitry Frolov <frolov@swemel.ru> writes:

> Some tests need more time when qemu is built with
> "--enable-asan --enable-ubsan"
>
> As was discussed here:
> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.ru/
>
> TIMEOUT_MULTIPLIER enviroment variable will be
> a useful option, allowing non-invasive timeouts
> increasing for a specific build.
>
> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>

Tested-by: Fabiano Rosas <farosas@suse.de>

and queued for qtest.


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-13 21:13 ` Fabiano Rosas
@ 2024-11-26 17:48   ` Pierrick Bouvier
  2024-11-26 18:14     ` Fabiano Rosas
  0 siblings, 1 reply; 11+ messages in thread
From: Pierrick Bouvier @ 2024-11-26 17:48 UTC (permalink / raw)
  To: Fabiano Rosas, Dmitry Frolov, lvivier; +Cc: sdl.qemu, qemu-devel

On 11/13/24 13:13, Fabiano Rosas wrote:
> Dmitry Frolov <frolov@swemel.ru> writes:
> 
>> Some tests need more time when qemu is built with
>> "--enable-asan --enable-ubsan"
>>
>> As was discussed here:
>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.ru/
>>
>> TIMEOUT_MULTIPLIER enviroment variable will be
>> a useful option, allowing non-invasive timeouts
>> increasing for a specific build.
>>
>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
> 
> Tested-by: Fabiano Rosas <farosas@suse.de>
> 
> and queued for qtest.
> 

Hi Fabiano,

will a PR be sent for 9.2 release, or later?

Regards,
Pierrick


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-26 17:48   ` Pierrick Bouvier
@ 2024-11-26 18:14     ` Fabiano Rosas
  2024-11-26 18:22       ` Pierrick Bouvier
  0 siblings, 1 reply; 11+ messages in thread
From: Fabiano Rosas @ 2024-11-26 18:14 UTC (permalink / raw)
  To: Pierrick Bouvier, Dmitry Frolov, lvivier; +Cc: sdl.qemu, qemu-devel

Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> On 11/13/24 13:13, Fabiano Rosas wrote:
>> Dmitry Frolov <frolov@swemel.ru> writes:
>> 
>>> Some tests need more time when qemu is built with
>>> "--enable-asan --enable-ubsan"
>>>
>>> As was discussed here:
>>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.ru/
>>>
>>> TIMEOUT_MULTIPLIER enviroment variable will be
>>> a useful option, allowing non-invasive timeouts
>>> increasing for a specific build.
>>>
>>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>> 
>> Tested-by: Fabiano Rosas <farosas@suse.de>
>> 
>> and queued for qtest.
>> 
>
> Hi Fabiano,
>
> will a PR be sent for 9.2 release, or later?

I queued this for 10.0, it doesn't actually fix anything (only allows
testing to proceed when the variable is set in the cmdline), so it's too
late for 9.2.


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-26 18:14     ` Fabiano Rosas
@ 2024-11-26 18:22       ` Pierrick Bouvier
  0 siblings, 0 replies; 11+ messages in thread
From: Pierrick Bouvier @ 2024-11-26 18:22 UTC (permalink / raw)
  To: Fabiano Rosas, Dmitry Frolov, lvivier; +Cc: sdl.qemu, qemu-devel

On 11/26/24 10:14, Fabiano Rosas wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> On 11/13/24 13:13, Fabiano Rosas wrote:
>>> Dmitry Frolov <frolov@swemel.ru> writes:
>>>
>>>> Some tests need more time when qemu is built with
>>>> "--enable-asan --enable-ubsan"
>>>>
>>>> As was discussed here:
>>>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.ru/
>>>>
>>>> TIMEOUT_MULTIPLIER enviroment variable will be
>>>> a useful option, allowing non-invasive timeouts
>>>> increasing for a specific build.
>>>>
>>>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>>>
>>> Tested-by: Fabiano Rosas <farosas@suse.de>
>>>
>>> and queued for qtest.
>>>
>>
>> Hi Fabiano,
>>
>> will a PR be sent for 9.2 release, or later?
> 
> I queued this for 10.0, it doesn't actually fix anything (only allows
> testing to proceed when the variable is set in the cmdline), so it's too
> late for 9.2.

Ok thank you!
Just wanted to make sure it does not get lost.

Regards,
Pierrick


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-13  9:43 [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER Dmitry Frolov
  2024-11-13 21:13 ` Fabiano Rosas
@ 2024-11-26 18:32 ` Daniel P. Berrangé
  2024-11-27  7:24   ` Дмитрий Фролов
  2024-11-27  7:40   ` Дмитрий Фролов
  1 sibling, 2 replies; 11+ messages in thread
From: Daniel P. Berrangé @ 2024-11-26 18:32 UTC (permalink / raw)
  To: Dmitry Frolov; +Cc: farosas, lvivier, sdl.qemu, qemu-devel

On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
> Some tests need more time when qemu is built with
> "--enable-asan --enable-ubsan"
> 
> As was discussed here:
> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
> 
> TIMEOUT_MULTIPLIER enviroment variable will be
> a useful option, allowing non-invasive timeouts
> increasing for a specific build.
> 
> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
> ---
>  scripts/mtest2make.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
> index eb01a05ddb..ff60b62724 100644
> --- a/scripts/mtest2make.py
> +++ b/scripts/mtest2make.py
> @@ -27,7 +27,9 @@ def names(self, base):
>  .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
>  .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>  
> +ifndef TIMEOUT_MULTIPLIER
>  TIMEOUT_MULTIPLIER = 1
> +endif

Can you explain what scenario this is needed for, as unless I'm
missing something this change has no purpose. This assignment is
merely defining the defalt value, which can already be overridden
at runtime without this 'ifndef'

eg

$ make check-unit TIMEOUT_MULTIPLIER=7

In another shell:

$ ps -axuwwf | grep 'meson test'
berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   0:00                  \_ /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit

shows TIMEOUT_MULTIPLIER being honoured



With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-26 18:32 ` Daniel P. Berrangé
@ 2024-11-27  7:24   ` Дмитрий Фролов
  2024-11-27  7:40   ` Дмитрий Фролов
  1 sibling, 0 replies; 11+ messages in thread
From: Дмитрий Фролов @ 2024-11-27  7:24 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: farosas, lvivier, sdl.qemu, qemu-devel

Hello, Daniel.

On 26.11.2024 21:32, Daniel P. Berrangé wrote:
> On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
>> Some tests need more time when qemu is built with
>> "--enable-asan --enable-ubsan"
>>
>> As was discussed here:
>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
>>
>> TIMEOUT_MULTIPLIER enviroment variable will be
>> a useful option, allowing non-invasive timeouts
>> increasing for a specific build.
>>
>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>> ---
>>   scripts/mtest2make.py | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
>> index eb01a05ddb..ff60b62724 100644
>> --- a/scripts/mtest2make.py
>> +++ b/scripts/mtest2make.py
>> @@ -27,7 +27,9 @@ def names(self, base):
>>   .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
>>   .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>>   
>> +ifndef TIMEOUT_MULTIPLIER
>>   TIMEOUT_MULTIPLIER = 1
>> +endif
> Can you explain what scenario this is needed for, as unless I'm
> missing something this change has no purpose. This assignment is
> merely defining the defalt value, which can already be overridden
> at runtime without this 'ifndef'
Without this 'ifndef', TIMEOUT_MULTIPLIER will be overwritten to 1.
With this 'ifndef',  the value, provided by the user will be used.
> eg
>
> $ make check-unit TIMEOUT_MULTIPLIER=7
>
> In another shell:
>
> $ ps -axuwwf | grep 'meson test'
> berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   0:00                  \_ /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit
>
> shows TIMEOUT_MULTIPLIER being honoured
>
>
>
> With regards,
> Daniel
With best regards,
Dmitry


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-26 18:32 ` Daniel P. Berrangé
  2024-11-27  7:24   ` Дмитрий Фролов
@ 2024-11-27  7:40   ` Дмитрий Фролов
  2024-11-27 18:44     ` Pierrick Bouvier
  1 sibling, 1 reply; 11+ messages in thread
From: Дмитрий Фролов @ 2024-11-27  7:40 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: farosas, lvivier, sdl.qemu, qemu-devel

Hello, Daniel

On 26.11.2024 21:32, Daniel P. Berrangé wrote:
> On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
>> Some tests need more time when qemu is built with
>> "--enable-asan --enable-ubsan"
>>
>> As was discussed here:
>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
>>
>> TIMEOUT_MULTIPLIER enviroment variable will be
>> a useful option, allowing non-invasive timeouts
>> increasing for a specific build.
>>
>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>> ---
>>   scripts/mtest2make.py | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
>> index eb01a05ddb..ff60b62724 100644
>> --- a/scripts/mtest2make.py
>> +++ b/scripts/mtest2make.py
>> @@ -27,7 +27,9 @@ def names(self, base):
>>   .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
>>   .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>>   
>> +ifndef TIMEOUT_MULTIPLIER
>>   TIMEOUT_MULTIPLIER = 1
>> +endif
> Can you explain what scenario this is needed for, as unless I'm
> missing something this change has no purpose. This assignment is
> merely defining the defalt value, which can already be overridden
> at runtime without this 'ifndef'
>
> eg
>
> $ make check-unit TIMEOUT_MULTIPLIER=7
>
> In another shell:
>
> $ ps -axuwwf | grep 'meson test'
> berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   0:00                  \_ /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit
>
> shows TIMEOUT_MULTIPLIER being honoured
Yeah... You are right!
It is possible to set TIMEOUT_MULTIPLIER only to run tests.
It is not necessary to set it for the whole build.

Sorry, and thanks a lot!
>
>
> With regards,
> Daniel
regards,
Dmitry


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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-27  7:40   ` Дмитрий Фролов
@ 2024-11-27 18:44     ` Pierrick Bouvier
  2024-11-27 19:22       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 11+ messages in thread
From: Pierrick Bouvier @ 2024-11-27 18:44 UTC (permalink / raw)
  To: Дмитрий Фролов,
	Daniel P. Berrangé
  Cc: farosas, lvivier, sdl.qemu, qemu-devel

On 11/26/24 23:40, Дмитрий Фролов wrote:
> Hello, Daniel
> 
> On 26.11.2024 21:32, Daniel P. Berrangé wrote:
>> On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
>>> Some tests need more time when qemu is built with
>>> "--enable-asan --enable-ubsan"
>>>
>>> As was discussed here:
>>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
>>>
>>> TIMEOUT_MULTIPLIER enviroment variable will be
>>> a useful option, allowing non-invasive timeouts
>>> increasing for a specific build.
>>>
>>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>>> ---
>>>    scripts/mtest2make.py | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
>>> index eb01a05ddb..ff60b62724 100644
>>> --- a/scripts/mtest2make.py
>>> +++ b/scripts/mtest2make.py
>>> @@ -27,7 +27,9 @@ def names(self, base):
>>>    .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), --suite $s)
>>>    .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>>>    
>>> +ifndef TIMEOUT_MULTIPLIER
>>>    TIMEOUT_MULTIPLIER = 1
>>> +endif
>> Can you explain what scenario this is needed for, as unless I'm
>> missing something this change has no purpose. This assignment is
>> merely defining the defalt value, which can already be overridden
>> at runtime without this 'ifndef'
>>
>> eg
>>
>> $ make check-unit TIMEOUT_MULTIPLIER=7
>>
>> In another shell:
>>
>> $ ps -axuwwf | grep 'meson test'
>> berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   0:00                  \_ /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit
>>
>> shows TIMEOUT_MULTIPLIER being honoured
> Yeah... You are right!
> It is possible to set TIMEOUT_MULTIPLIER only to run tests.
> It is not necessary to set it for the whole build.
> 
> Sorry, and thanks a lot!
>>
>>
>> With regards,
>> Daniel
> regards,
> Dmitry
> 

This patch is still useful if we want to set TIMEOUT_MULTIPLIER as 
global env variable, and not explicitely on each make invocation.

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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-27 18:44     ` Pierrick Bouvier
@ 2024-11-27 19:22       ` Philippe Mathieu-Daudé
  2024-12-09 17:42         ` Fabiano Rosas
  0 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-11-27 19:22 UTC (permalink / raw)
  To: Pierrick Bouvier,
	Дмитрий Фролов,
	Daniel P. Berrangé
  Cc: farosas, lvivier, sdl.qemu, qemu-devel

On 27/11/24 19:44, Pierrick Bouvier wrote:
> On 11/26/24 23:40, Дмитрий Фролов wrote:
>> Hello, Daniel
>>
>> On 26.11.2024 21:32, Daniel P. Berrangé wrote:
>>> On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
>>>> Some tests need more time when qemu is built with
>>>> "--enable-asan --enable-ubsan"
>>>>
>>>> As was discussed here:
>>>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
>>>>
>>>> TIMEOUT_MULTIPLIER enviroment variable will be
>>>> a useful option, allowing non-invasive timeouts
>>>> increasing for a specific build.
>>>>
>>>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>>>> ---
>>>>    scripts/mtest2make.py | 2 ++
>>>>    1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
>>>> index eb01a05ddb..ff60b62724 100644
>>>> --- a/scripts/mtest2make.py
>>>> +++ b/scripts/mtest2make.py
>>>> @@ -27,7 +27,9 @@ def names(self, base):
>>>>    .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), 
>>>> --suite $s)
>>>>    .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>>>> +ifndef TIMEOUT_MULTIPLIER
>>>>    TIMEOUT_MULTIPLIER = 1
>>>> +endif
>>> Can you explain what scenario this is needed for, as unless I'm
>>> missing something this change has no purpose. This assignment is
>>> merely defining the defalt value, which can already be overridden
>>> at runtime without this 'ifndef'
>>>
>>> eg
>>>
>>> $ make check-unit TIMEOUT_MULTIPLIER=7
>>>
>>> In another shell:
>>>
>>> $ ps -axuwwf | grep 'meson test'
>>> berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   
>>> 0:00                  \_ 
>>> /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 
>>> /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test 
>>> --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit
>>>
>>> shows TIMEOUT_MULTIPLIER being honoured
>> Yeah... You are right!
>> It is possible to set TIMEOUT_MULTIPLIER only to run tests.
>> It is not necessary to set it for the whole build.
>>
>> Sorry, and thanks a lot!
>>>
>>>
>>> With regards,
>>> Daniel
>> regards,
>> Dmitry
>>
> 
> This patch is still useful if we want to set TIMEOUT_MULTIPLIER as 
> global env variable, and not explicitely on each make invocation.

If so, I'd rather use conditional assignment [*]:

- TIMEOUT_MULTIPLIER = 1
+ TIMEOUT_MULTIPLIER ?= 1

[*] 
https://www.gnu.org/software/make/manual/html_node/Conditional-Assignment.html




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

* Re: [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER
  2024-11-27 19:22       ` Philippe Mathieu-Daudé
@ 2024-12-09 17:42         ` Fabiano Rosas
  0 siblings, 0 replies; 11+ messages in thread
From: Fabiano Rosas @ 2024-12-09 17:42 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Pierrick Bouvier,
	Дмитрий Фролов,
	Daniel P. Berrangé
  Cc: lvivier, sdl.qemu, qemu-devel

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 27/11/24 19:44, Pierrick Bouvier wrote:
>> On 11/26/24 23:40, Дмитрий Фролов wrote:
>>> Hello, Daniel
>>>
>>> On 26.11.2024 21:32, Daniel P. Berrangé wrote:
>>>> On Wed, Nov 13, 2024 at 12:43:40PM +0300, Dmitry Frolov wrote:
>>>>> Some tests need more time when qemu is built with
>>>>> "--enable-asan --enable-ubsan"
>>>>>
>>>>> As was discussed here:
>>>>> https://patchew.org/QEMU/20241112120100.176492-2-frolov@swemel.r/u
>>>>>
>>>>> TIMEOUT_MULTIPLIER enviroment variable will be
>>>>> a useful option, allowing non-invasive timeouts
>>>>> increasing for a specific build.
>>>>>
>>>>> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
>>>>> ---
>>>>>    scripts/mtest2make.py | 2 ++
>>>>>    1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
>>>>> index eb01a05ddb..ff60b62724 100644
>>>>> --- a/scripts/mtest2make.py
>>>>> +++ b/scripts/mtest2make.py
>>>>> @@ -27,7 +27,9 @@ def names(self, base):
>>>>>    .speed.slow = $(foreach s,$(sort $(filter-out %-thorough, $1)), 
>>>>> --suite $s)
>>>>>    .speed.thorough = $(foreach s,$(sort $1), --suite $s)
>>>>> +ifndef TIMEOUT_MULTIPLIER
>>>>>    TIMEOUT_MULTIPLIER = 1
>>>>> +endif
>>>> Can you explain what scenario this is needed for, as unless I'm
>>>> missing something this change has no purpose. This assignment is
>>>> merely defining the defalt value, which can already be overridden
>>>> at runtime without this 'ifndef'
>>>>
>>>> eg
>>>>
>>>> $ make check-unit TIMEOUT_MULTIPLIER=7
>>>>
>>>> In another shell:
>>>>
>>>> $ ps -axuwwf | grep 'meson test'
>>>> berrange 1931657  3.9  0.1 330904 99344 pts/1    S+   18:29   
>>>> 0:00                  \_ 
>>>> /var/home/berrange/src/virt/qemu/build/pyvenv/bin/python3 
>>>> /var/home/berrange/src/virt/qemu/build/pyvenv/bin/meson test 
>>>> --no-rebuild -t 7 --num-processes 1 --print-errorlogs --suite unit
>>>>
>>>> shows TIMEOUT_MULTIPLIER being honoured
>>> Yeah... You are right!
>>> It is possible to set TIMEOUT_MULTIPLIER only to run tests.
>>> It is not necessary to set it for the whole build.
>>>
>>> Sorry, and thanks a lot!
>>>>
>>>>
>>>> With regards,
>>>> Daniel
>>> regards,
>>> Dmitry
>>>
>> 
>> This patch is still useful if we want to set TIMEOUT_MULTIPLIER as 
>> global env variable, and not explicitely on each make invocation.
>
> If so, I'd rather use conditional assignment [*]:
>
> - TIMEOUT_MULTIPLIER = 1
> + TIMEOUT_MULTIPLIER ?= 1
>
> [*] 
> https://www.gnu.org/software/make/manual/html_node/Conditional-Assignment.html

I can fix that up in qtest-next, thanks.


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

end of thread, other threads:[~2024-12-09 17:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13  9:43 [PATCH] tests/qtest: add TIMEOUT_MULTIPLIER Dmitry Frolov
2024-11-13 21:13 ` Fabiano Rosas
2024-11-26 17:48   ` Pierrick Bouvier
2024-11-26 18:14     ` Fabiano Rosas
2024-11-26 18:22       ` Pierrick Bouvier
2024-11-26 18:32 ` Daniel P. Berrangé
2024-11-27  7:24   ` Дмитрий Фролов
2024-11-27  7:40   ` Дмитрий Фролов
2024-11-27 18:44     ` Pierrick Bouvier
2024-11-27 19:22       ` Philippe Mathieu-Daudé
2024-12-09 17:42         ` Fabiano Rosas

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.