test_firmware: Test partial read support
authorScott Branden <scott.branden@broadcom.com>
Fri, 2 Oct 2020 17:38:28 +0000 (10:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Oct 2020 11:37:04 +0000 (13:37 +0200)
commit5d90e05c0e83ee5c67fdba1fa56e590103aac9fd
tree4bb05f7145d4a98ce3b701d59121596230f4125c
parent59cdb23ca2dfef3b93411d1105409dfe9cd1f62f
test_firmware: Test partial read support

Add additional hooks to test_firmware to pass in support
for partial file read using request_firmware_into_buf():

buf_size: size of buffer to request firmware into
partial: indicates that a partial file request is being made
file_offset: to indicate offset into file to request

Also update firmware selftests to use the new partial read test API.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201002173828.2099543-17-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/test_firmware.c
tools/testing/selftests/firmware/fw_filesystem.sh