2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 04:03:58 +08:00
linux-next/tools/testing/kunit
David Gow ad659ccb54 kunit: tool: Default --jobs to number of CPUs
The --jobs parameter for kunit_tool currently defaults to 8 CPUs,
regardless of the number available. For systems with significantly more
(or less), this is not as efficient. Instead, default --jobs to the
number of CPUs available to the process: while there are as many
superstitions as to exactly what the ideal jobs:CPU ratio is, this seems
sufficiently sensible to me.

A new helper function to get the default number of jobs is added:
get_default_jobs() -- this is used in kunit_tool_test instead of a
hardcoded value, or an explicit call to len(os.sched_getaffinity()), so
should be more flexible if this needs to change in the future.

Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-12-15 16:44:55 -07:00
..
configs kunit: Remove the unused all_tests.config 2021-06-23 17:49:41 -06:00
qemu_configs kunit: tool: add support for QEMU 2021-06-11 16:10:23 -06:00
test_data kunit: tool: Report an error if any test has no subtests 2021-12-13 13:36:15 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit_config.py kunit: tool: move Kconfig read_from_file/parse_from_string to package-level 2021-12-13 13:53:30 -07:00
kunit_json.py kunit: tool: delete kunit_parser.TestResult type 2021-12-15 11:50:56 -07:00
kunit_kernel.py kunit: tool: fix newly introduced typechecker errors 2021-12-15 16:44:49 -07:00
kunit_parser.py kunit: tool: fix newly introduced typechecker errors 2021-12-15 16:44:49 -07:00
kunit_tool_test.py kunit: tool: Default --jobs to number of CPUs 2021-12-15 16:44:55 -07:00
kunit.py kunit: tool: Default --jobs to number of CPUs 2021-12-15 16:44:55 -07:00
qemu_config.py kunit: tool: add support for QEMU 2021-06-11 16:10:23 -06:00
run_checks.py kunit: add run_checks.py script to validate kunit changes 2021-12-13 13:35:22 -07:00