aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/selftests/firmware/fw_filesystem.sh34
1 files changed, 21 insertions, 13 deletions
diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
index 62f2d6f54929..b1f20fef36c7 100755
--- a/tools/testing/selftests/firmware/fw_filesystem.sh
+++ b/tools/testing/selftests/firmware/fw_filesystem.sh
@@ -70,9 +70,13 @@ if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then
70 exit 1 70 exit 1
71fi 71fi
72 72
73if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then 73if [ ! -e "$DIR"/trigger_async_request ]; then
74 echo "$0: empty filename should not succeed (async)" >&2 74 echo "$0: empty filename: async trigger not present, ignoring test" >&2
75 exit 1 75else
76 if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then
77 echo "$0: empty filename should not succeed (async)" >&2
78 exit 1
79 fi
76fi 80fi
77 81
78# Request a firmware that doesn't exist, it should fail. 82# Request a firmware that doesn't exist, it should fail.
@@ -105,17 +109,21 @@ else
105fi 109fi
106 110
107# Try the asynchronous version too 111# Try the asynchronous version too
108if ! echo -n "$NAME" >"$DIR"/trigger_async_request ; then 112if [ ! -e "$DIR"/trigger_async_request ]; then
109 echo "$0: could not trigger async request" >&2 113 echo "$0: firmware loading: async trigger not present, ignoring test" >&2
110 exit 1
111fi
112
113# Verify the contents are what we expect.
114if ! diff -q "$FW" /dev/test_firmware >/dev/null ; then
115 echo "$0: firmware was not loaded (async)" >&2
116 exit 1
117else 114else
118 echo "$0: async filesystem loading works" 115 if ! echo -n "$NAME" >"$DIR"/trigger_async_request ; then
116 echo "$0: could not trigger async request" >&2
117 exit 1
118 fi
119
120 # Verify the contents are what we expect.
121 if ! diff -q "$FW" /dev/test_firmware >/dev/null ; then
122 echo "$0: firmware was not loaded (async)" >&2
123 exit 1
124 else
125 echo "$0: async filesystem loading works"
126 fi
119fi 127fi
120 128
121### Batched requests tests 129### Batched requests tests