OpenCloudOS-Kernel/tools/testing/kunit
David Gow 3c4fc7bf4c kunit: tool: Don't download risc-v opensbi firmware with wget
When running a RISC-V test kernel under QEMU, we need an OpenSBI BIOS
file. In the original QEMU support patchset, kunit_tool would optionally
download this file from GitHub if it didn't exist, using wget.

These days, it can usually be found in the distro's qemu-system-riscv
package, and is located in /usr/share/qemu on all the distros I tried
(Debian, Arch, OpenSUSE). Use this file, and thereby don't do any
downloading in kunit_tool.

In addition, we used to shell out to whatever 'wget' was in the path,
which could have potentially been used to trick the developer into
running another binary. By not using wget at all, we nicely sidestep
this issue.

Cc: Xu Panda <xu.panda@zte.com.cn>
Fixes: 87c9c16317 ("kunit: tool: add support for QEMU")
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Gow <davidgow@google.com>
Tested-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-10-07 10:16:28 -06:00
..
configs kunit: tool: rename all_test_uml.config, use it for --alltests 2022-09-30 13:22:55 -06:00
qemu_configs kunit: tool: Don't download risc-v opensbi firmware with wget 2022-10-07 10:16:28 -06:00
test_data kunit: tool: make parser stop overwriting status of suites w/ no_tests 2022-05-16 13:22:12 -06:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit.py kunit: tool: rename all_test_uml.config, use it for --alltests 2022-09-30 13:22:55 -06:00
kunit_config.py kunit: tool: make --kunitconfig repeatable, blindly concat 2022-07-08 11:22:02 -06:00
kunit_json.py kunit: tool: misc cleanups 2022-05-16 13:22:36 -06:00
kunit_kernel.py kunit: tool: rename all_test_uml.config, use it for --alltests 2022-09-30 13:22:55 -06:00
kunit_parser.py kunit: tool: make --raw_output=kunit (aka --raw_output) preserve leading spaces 2022-09-30 13:17:17 -06:00
kunit_printer.py kunit: tool: refactoring printing logic into kunit_printer.py 2022-07-07 17:46:25 -06:00
kunit_tool_test.py kunit: tool: rename all_test_uml.config, use it for --alltests 2022-09-30 13:22:55 -06:00
qemu_config.py kunit: tool: drop last uses of collections.namedtuple 2022-04-04 14:25:53 -06:00
run_checks.py kunit: tool: misc cleanups 2022-05-16 13:22:36 -06:00