]> git.baikalelectronics.ru Git - kernel.git/commit
kunit: tool: Don't download risc-v opensbi firmware with wget
authorDavid Gow <davidgow@google.com>
Fri, 23 Sep 2022 05:00:39 +0000 (13:00 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 7 Oct 2022 16:16:28 +0000 (10:16 -0600)
commit626d13fe325b65d60a99ec70c9e8223fbfa8b87c
treedfb4d266a0ff9003138dcf621cda477e22623804
parentcdae43026ce430f7f50b7695b930527877cf6369
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: 43f89ec76791 ("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>
tools/testing/kunit/qemu_configs/riscv.py