summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/firmware/fw_fallback.sh
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2018-03-10 17:14:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-14 21:49:23 +0300
commit29a1c00ce1df8a75bea6e6a86876a10c8dcc2c59 (patch)
tree285c27cac716f0b0385c4a601f3a65f56088ab1e /tools/testing/selftests/firmware/fw_fallback.sh
parent0c8efd610b58cb23cefdfa12015799079aef94ae (diff)
downloadlinux-29a1c00ce1df8a75bea6e6a86876a10c8dcc2c59.tar.xz
test_firmware: add simple firmware firmware test library
We'll expland on this later, for now just add basic module checker. While at it, move this all to use /bin/bash as we'll have much more flexibility with it. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/firmware/fw_fallback.sh')
-rwxr-xr-xtools/testing/selftests/firmware/fw_fallback.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh
index 722cad91df74..755147a8c967 100755
--- a/tools/testing/selftests/firmware/fw_fallback.sh
+++ b/tools/testing/selftests/firmware/fw_fallback.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# This validates that the kernel will fall back to using the fallback mechanism
# to load firmware it can't find on disk itself. We must request a firmware
@@ -6,9 +6,10 @@
# won't find so that we can do the load ourself manually.
set -e
-modprobe test_firmware
+TEST_DIR=$(dirname $0)
+source $TEST_DIR/fw_lib.sh
-DIR=/sys/devices/virtual/misc/test_firmware
+check_mods
# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/
# These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that