Commit 881c23de authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman
Browse files

test_firmware: wrap sysfs timeout test into helper



This cannot run on all kernel builds. This will help us later
skip this test on kernel configs where non-applicable.

Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f722712
Loading
Loading
Loading
Loading
+37 −32
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ trap "test_finish" EXIT
echo "ABCD0123" >"$FW"
NAME=$(basename "$FW")

test_syfs_timeout()
{
	DEVPATH="$DIR"/"nope-$NAME"/loading

	# Test failure when doing nothing (timeout works).
@@ -208,6 +210,9 @@ if diff -q "$FW" /dev/test_firmware >/dev/null ; then
	else
		echo "$0: timeout works"
	fi
}

test_syfs_timeout

# Put timeout high enough for us to do work but not so long that failures
# slow down this test too much.