* [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts
@ 2022-12-09 16:47 Philippe Mathieu-Daudé
2022-12-15 10:12 ` Thomas Huth
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-09 16:47 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Philippe Mathieu-Daudé,
Beraldo Leal, Wainer dos Santos Moschetta, Alex Bennée,
John Snow
On non-x86_64 host, if KVM is not available we get:
Traceback (most recent call last):
File "tests/vm/basevm.py", line 634, in main
vm = vmcls(args, config=config)
File "tests/vm/basevm.py", line 104, in __init__
mem = max(4, args.jobs)
TypeError: '>' not supported between instances of 'NoneType' and 'int'
Fix by always returning a -- not ideal but safe -- '1' value.
Fixes: b09539444a ("tests/vm: allow us to take advantage of MTTCG")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tests/vm/basevm.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 2276364c42..23229e23d1 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -569,8 +569,7 @@ def get_default_jobs():
# more cores. but only up to a reasonable limit. User
# can always override these limits with --jobs.
return min(multiprocessing.cpu_count() // 2, 8)
- else:
- return 1
+ return 1
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts
2022-12-09 16:47 [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts Philippe Mathieu-Daudé
@ 2022-12-15 10:12 ` Thomas Huth
2023-01-06 21:58 ` John Snow
2023-01-07 15:13 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2022-12-15 10:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Beraldo Leal, Wainer dos Santos Moschetta, Alex Bennée, John Snow
On 09/12/2022 17.47, Philippe Mathieu-Daudé wrote:
> On non-x86_64 host, if KVM is not available we get:
>
> Traceback (most recent call last):
> File "tests/vm/basevm.py", line 634, in main
> vm = vmcls(args, config=config)
> File "tests/vm/basevm.py", line 104, in __init__
> mem = max(4, args.jobs)
> TypeError: '>' not supported between instances of 'NoneType' and 'int'
>
> Fix by always returning a -- not ideal but safe -- '1' value.
>
> Fixes: b09539444a ("tests/vm: allow us to take advantage of MTTCG")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> tests/vm/basevm.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 2276364c42..23229e23d1 100644
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -569,8 +569,7 @@ def get_default_jobs():
> # more cores. but only up to a reasonable limit. User
> # can always override these limits with --jobs.
> return min(multiprocessing.cpu_count() // 2, 8)
> - else:
> - return 1
> + return 1
>
> parser = argparse.ArgumentParser(
> formatter_class=argparse.ArgumentDefaultsHelpFormatter,
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts
2022-12-09 16:47 [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts Philippe Mathieu-Daudé
2022-12-15 10:12 ` Thomas Huth
@ 2023-01-06 21:58 ` John Snow
2023-01-07 15:13 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2023-01-06 21:58 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Thomas Huth, Beraldo Leal,
Wainer dos Santos Moschetta, Alex Bennée
On Fri, Dec 9, 2022 at 11:47 AM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> On non-x86_64 host, if KVM is not available we get:
>
> Traceback (most recent call last):
> File "tests/vm/basevm.py", line 634, in main
> vm = vmcls(args, config=config)
> File "tests/vm/basevm.py", line 104, in __init__
> mem = max(4, args.jobs)
> TypeError: '>' not supported between instances of 'NoneType' and 'int'
>
> Fix by always returning a -- not ideal but safe -- '1' value.
>
> Fixes: b09539444a ("tests/vm: allow us to take advantage of MTTCG")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
> ---
> tests/vm/basevm.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 2276364c42..23229e23d1 100644
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -569,8 +569,7 @@ def get_default_jobs():
> # more cores. but only up to a reasonable limit. User
> # can always override these limits with --jobs.
> return min(multiprocessing.cpu_count() // 2, 8)
> - else:
> - return 1
> + return 1
>
> parser = argparse.ArgumentParser(
> formatter_class=argparse.ArgumentDefaultsHelpFormatter,
> --
> 2.38.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts
2022-12-09 16:47 [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts Philippe Mathieu-Daudé
2022-12-15 10:12 ` Thomas Huth
2023-01-06 21:58 ` John Snow
@ 2023-01-07 15:13 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2023-01-07 15:13 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Thomas Huth, Beraldo Leal,
Wainer dos Santos Moschetta, John Snow
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> On non-x86_64 host, if KVM is not available we get:
>
> Traceback (most recent call last):
> File "tests/vm/basevm.py", line 634, in main
> vm = vmcls(args, config=config)
> File "tests/vm/basevm.py", line 104, in __init__
> mem = max(4, args.jobs)
> TypeError: '>' not supported between instances of 'NoneType' and 'int'
>
> Fix by always returning a -- not ideal but safe -- '1' value.
>
> Fixes: b09539444a ("tests/vm: allow us to take advantage of MTTCG")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Queued to testing/next, thanks.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-07 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 16:47 [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts Philippe Mathieu-Daudé
2022-12-15 10:12 ` Thomas Huth
2023-01-06 21:58 ` John Snow
2023-01-07 15:13 ` Alex Bennée
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.