Skip to contentSkip to conversation

fs-test.sh: Correct check_md5() test with newlines

PATCH New Tom Rini 1 participant 2 messages Aug 22, 2016 – Aug 23, 2016

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 fs-test.sh: Correct check_md5() test with newlines

The fs-test.sh script expected there to be a \n\r style newline at the end of the output. This is no longer the case, so use 'tr' to remove the \r that we get.

Fixes: (c5917b4b054d "dm: serial-uclass: Move a carriage return before a
line feed")

---
 test/fs/fs-test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/fs/fs-test.sh +1 -1
index 043e5d0c0e49..93679cb21e88 100755
@@ -400,7 +400,7 @@ check_md5() {
 	# md5sum in u-boot has output of form:
 	# md5 for 01000008 ... 01100007 ==> <md5>
 	# the 7th field is the actual md5
-	md5_src=`grep -A3 "$1" "$2" | grep "md5 for"`
+	md5_src=`grep -A3 "$1" "$2" | grep "md5 for" | tr -d '\r'`
 	md5_src=($md5_src)
 	md5_src=${md5_src[6]}
 
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 fs-test.sh: Correct check_md5() test with newlines

Quoted 7 lines · Tom Rini

The fs-test.sh script expected there to be a \n\r style newline at the end of the output. This is no longer the case, so use 'tr' to remove the \r that we get.

Fixes: (c5917b4b054d "dm: serial-uclass: Move a carriage return before a
line feed")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160822/47626caf/attachment.sig>