diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2018-03-10 09:14:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 14:49:24 -0400 |
commit | 9cc853203c3bf4d3b0c466c5525750c071624b05 (patch) | |
tree | 3eedd0987233f1f89f1d7ba14ffa2a7b0421f041 | |
parent | ef557787f4f04b62d7a50101154ffe1614b88a7a (diff) |
test_firmware: replace syfs fallback check with kconfig_has helper
Now that we have a kconfig checker just use that instead of relying
on testing a sysfs directory being present, since our requirements
are spelled out.
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-x | tools/testing/selftests/firmware/fw_fallback.sh | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh index bf850050e5e9..323c921a2469 100755 --- a/tools/testing/selftests/firmware/fw_fallback.sh +++ b/tools/testing/selftests/firmware/fw_fallback.sh | |||
@@ -11,10 +11,7 @@ source $TEST_DIR/fw_lib.sh | |||
11 | 11 | ||
12 | check_mods | 12 | check_mods |
13 | 13 | ||
14 | # CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/ | 14 | HAS_FW_LOADER_USER_HELPER=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER=y) |
15 | # These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that | ||
16 | # as an indicator for CONFIG_FW_LOADER_USER_HELPER. | ||
17 | HAS_FW_LOADER_USER_HELPER=$(if [ -d /sys/class/firmware/ ]; then echo yes; else echo no; fi) | ||
18 | HAS_FW_LOADER_USER_HELPER_FALLBACK=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y) | 15 | HAS_FW_LOADER_USER_HELPER_FALLBACK=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y) |
19 | 16 | ||
20 | if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then | 17 | if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then |