From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: gregkh@linuxfoundation.org, ming.lei@canonical.com
Cc: daniel.wagner@bmw-carit.de, teg@jklm.no, mchehab@osg.samsung.com,
zajec5@gmail.com, linux-kernel@vger.kernel.org,
markivx@codeaurora.org, stephen.boyd@linaro.org,
broonie@kernel.org, zohar@linux.vnet.ibm.com, tiwai@suse.de,
johannes@sipsolutions.net, chunkeey@googlemail.com,
hauke@hauke-m.de, jwboyer@fedoraproject.org,
dmitry.torokhov@gmail.com, dwmw2@infradead.org, jslaby@suse.com,
torvalds@linux-foundation.org, luto@amacapital.net,
fengguang.wu@intel.com, rpurdie@rpsys.net,
j.anaszewski@samsung.com, Abhay_Salunke@dell.com,
Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr,
nicolas.palix@imag.fr, dhowells@redhat.com,
bjorn.andersson@linaro.org, arend.vanspriel@broadcom.com,
kvalo@codeaurora.org, "Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: [PATCH v2 2/5] selftests: firmware: send expected errors to /dev/null
Date: Fri, 16 Dec 2016 03:10:35 -0800 [thread overview]
Message-ID: <20161216111038.22064-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20161216111038.22064-1-mcgrof@kernel.org>
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>
---
tools/testing/selftests/firmware/fw_filesystem.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
index c8ccdaa78479..e35691239350 100755
--- a/tools/testing/selftests/firmware/fw_filesystem.sh
+++ b/tools/testing/selftests/firmware/fw_filesystem.sh
@@ -63,18 +63,18 @@ echo "ABCD0123" >"$FW"
NAME=$(basename "$FW")
-if printf '\000' >"$DIR"/trigger_request; then
+if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then
echo "$0: empty filename should not succeed" >&2
exit 1
fi
-if printf '\000' >"$DIR"/trigger_async_request; then
+if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then
echo "$0: empty filename should not succeed (async)" >&2
exit 1
fi
# Request a firmware that doesn't exist, it should fail.
-if echo -n "nope-$NAME" >"$DIR"/trigger_request; then
+if echo -n "nope-$NAME" >"$DIR"/trigger_request 2> /dev/null; then
echo "$0: firmware shouldn't have loaded" >&2
exit 1
fi
--
2.10.1
next prev parent reply other threads:[~2016-12-16 11:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 11:10 [PATCH v2 0/5] firmware: doc revamp Luis R. Rodriguez
2016-12-16 11:10 ` [PATCH v2 1/5] selftests: firmware: only modprobe if driver is missing Luis R. Rodriguez
2016-12-16 11:10 ` Luis R. Rodriguez [this message]
2016-12-16 11:10 ` [PATCH v2 3/5] firmware: revamp firmware documentation Luis R. Rodriguez
2017-01-19 19:50 ` Kalle Valo
2016-12-16 11:10 ` [PATCH v2 4/5] firmware: add SmPL report for custom fallback mechanism Luis R. Rodriguez
2017-01-11 8:32 ` Greg KH
2017-01-11 14:02 ` Luis R. Rodriguez
2017-01-11 15:49 ` Greg KH
2017-01-11 17:25 ` Luis R. Rodriguez
2016-12-16 11:10 ` [PATCH v2 5/5] firmware: add DECLARE_FW_CUSTOM_FALLBACK() annotation Luis R. Rodriguez
2016-12-19 10:23 ` Julia Lawall
2017-01-09 20:46 ` Luis R. Rodriguez
2017-01-09 20:54 ` Luis R. Rodriguez
2017-01-09 21:09 ` Julia Lawall
2017-01-10 14:43 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161216111038.22064-3-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=Abhay_Salunke@dell.com \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=arend.vanspriel@broadcom.com \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=chunkeey@googlemail.com \
--cc=daniel.wagner@bmw-carit.de \
--cc=dhowells@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hauke@hauke-m.de \
--cc=j.anaszewski@samsung.com \
--cc=johannes@sipsolutions.net \
--cc=jslaby@suse.com \
--cc=jwboyer@fedoraproject.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=markivx@codeaurora.org \
--cc=mchehab@osg.samsung.com \
--cc=ming.lei@canonical.com \
--cc=nicolas.palix@imag.fr \
--cc=rpurdie@rpsys.net \
--cc=stephen.boyd@linaro.org \
--cc=teg@jklm.no \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
--cc=zajec5@gmail.com \
--cc=zohar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox