linux_dsm_epyc7002/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
..
config Revert "selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config" 2019-02-08 13:00:43 +01:00
fw_fallback.sh selftests: firmware: return Kselftest Skip code for skipped tests 2018-05-30 15:21:52 -06:00
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
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00