Skip to content
Snippets Groups Projects
Commit 44c8a6ab authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Thomas Huth
Browse files

tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts


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: b0953944 ("tests/vm: allow us to take advantage of MTTCG")
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221209164743.70836-1-philmd@linaro.org>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent ad302b21
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment