Skip to content

Commit 4afaa49

Browse files
mcgrofgregkh
authored andcommitted
selftests: firmware: send expected errors to /dev/null
commit 880444e214cfd293a2e8cc4bd3505f7ffa6ce33a upstream. Error that we expect should not be spilled to stdout. Without this we get: ./fw_filesystem.sh: line 58: printf: write error: Invalid argument ./fw_filesystem.sh: line 63: printf: write error: No such device ./fw_filesystem.sh: line 69: echo: write error: No such file or directory ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works With it: ./fw_filesystem.sh: filesystem loading works ./fw_filesystem.sh: async filesystem loading works Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> [AmitP: Dropped the async trigger testing parts from original commit] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ed1deec commit 4afaa49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/testing/selftests/firmware/fw_filesystem.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ echo "ABCD0123" >"$FW"
4848

4949
NAME=$(basename "$FW")
5050

51-
if printf '\000' >"$DIR"/trigger_request; then
51+
if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then
5252
echo "$0: empty filename should not succeed" >&2
5353
exit 1
5454
fi
5555

5656
# Request a firmware that doesn't exist, it should fail.
57-
if echo -n "nope-$NAME" >"$DIR"/trigger_request; then
57+
if echo -n "nope-$NAME" >"$DIR"/trigger_request 2> /dev/null; then
5858
echo "$0: firmware shouldn't have loaded" >&2
5959
exit 1
6060
fi

0 commit comments

Comments
 (0)