linux-kernelorg-stable/tools/testing/selftests/firmware
Shuah Khan c65e41538b selftests: firmware: Fix it to do root uid check and skip
firmware attempts to load test modules that require root access
and fail. Fix it to check for root uid and exit with skip code
instead.

Before this fix:

selftests: firmware: fw_run_tests.sh
modprobe: ERROR: could not insert 'test_firmware': Operation not permitted
You must have the following enabled in your kernel:
CONFIG_TEST_FIRMWARE=y
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
not ok 1 selftests: firmware: fw_run_tests.sh # SKIP

With this fix:

selftests: firmware: fw_run_tests.sh
skip all tests: must be run as root
not ok 1 selftests: firmware: fw_run_tests.sh # SKIP

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Reviwed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-12-23 10:52:40 -07:00
..
Makefile
config
fw_fallback.sh
fw_filesystem.sh selftests: firmware: Add request_firmware_into_buf tests 2019-09-04 13:31:28 +02:00
fw_lib.sh selftests: firmware: Fix it to do root uid check and skip 2019-12-23 10:52:40 -07:00
fw_run_tests.sh selftests: firmware: Add compressed firmware tests 2019-06-18 09:11:22 +02:00