From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Beraldo Leal" <bleal@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"John Snow" <jsnow@redhat.com>
Subject: Re: [PATCH-for-8.0] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts
Date: Thu, 15 Dec 2022 11:12:14 +0100 [thread overview]
Message-ID: <aaf97e80-1f1d-7a3a-ab08-0fc1aabc2c72@redhat.com> (raw)
In-Reply-To: <20221209164743.70836-1-philmd@linaro.org>
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>
next prev parent reply other threads:[~2022-12-15 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-01-06 21:58 ` John Snow
2023-01-07 15:13 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaf97e80-1f1d-7a3a-ab08-0fc1aabc2c72@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=bleal@redhat.com \
--cc=jsnow@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).