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>
This commit is contained in:
Luis R. Rodriguez
2018-03-10 06:14:42 -08:00
committed by Greg Kroah-Hartman
parent 0c8efd610b
commit 29a1c00ce1
3 changed files with 51 additions and 20 deletions

View File

@@ -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