Revert "selftests: firmware: remove use of non-standard diff -Z option"

This reverts commit f70b472e93.

This breaks testing on Debian, and this patch was NACKed anyway.
The proper way to address this is a quirk for busybox as that is
where the issue is present.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Fixes: f70b472e93 ("selftests: firmware: remove use of non-standard diff -Z option")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Luis Chamberlain 2019-02-07 11:06:01 -08:00 committed by Greg Kroah-Hartman
parent d2b284d356
commit 13ac7db09c
1 changed files with 6 additions and 3 deletions

View File

@ -155,8 +155,11 @@ read_firmwares()
{ {
for i in $(seq 0 3); do for i in $(seq 0 3); do
config_set_read_fw_idx $i config_set_read_fw_idx $i
# Verify the contents match # Verify the contents are what we expect.
if ! diff -q "$FW" $DIR/read_firmware 2>/dev/null ; then # -Z required for now -- check for yourself, md5sum
# on $FW and DIR/read_firmware will yield the same. Even
# cmp agrees, so something is off.
if ! diff -q -Z "$FW" $DIR/read_firmware 2>/dev/null ; then
echo "request #$i: firmware was not loaded" >&2 echo "request #$i: firmware was not loaded" >&2
exit 1 exit 1
fi fi
@ -168,7 +171,7 @@ read_firmwares_expect_nofile()
for i in $(seq 0 3); do for i in $(seq 0 3); do
config_set_read_fw_idx $i config_set_read_fw_idx $i
# Ensures contents differ # Ensures contents differ
if diff -q "$FW" $DIR/read_firmware 2>/dev/null ; then if diff -q -Z "$FW" $DIR/read_firmware 2>/dev/null ; then
echo "request $i: file was not expected to match" >&2 echo "request $i: file was not expected to match" >&2
exit 1 exit 1
fi fi