linux/tools/testing/kunit
Shuvam Pandey 40804c4974 kunit: tool: copy caller args in run_kernel to prevent mutation
run_kernel() appended KUnit flags directly to the caller-provided args
list. When exec_tests() calls run_kernel() repeatedly (e.g. with
--run_isolated), each call mutated the same list, causing later runs
to inherit stale filter_glob values and duplicate kunit.enable flags.

Fix this by copying args at the start of run_kernel(). Add a regression
test that calls run_kernel() twice with the same list and verifies the
original remains unchanged.

Fixes: ff9e09a376 ("kunit: tool: support running each suite/test separately")
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Reviewed-by: David Gow <david@davidgow.net>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2026-03-02 10:02:06 -07:00
..
configs
qemu_configs
test_data
.gitignore
kunit-completion.sh
kunit.py
kunit_config.py
kunit_json.py
kunit_kernel.py
kunit_parser.py
kunit_printer.py
kunit_tool_test.py
mypy.ini
qemu_config.py
run_checks.py