diff mbox

[U-Boot] fs-test.sh: Correct check_md5() test with newlines

Message ID 1471909208-28880-1-git-send-email-trini@konsulko.com
State Accepted
Commit 10ba92f69ef6cb15da5e2bc35c67975a7a9ba0ef
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Aug. 22, 2016, 11:40 p.m. UTC
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")
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 test/fs/fs-test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Aug. 23, 2016, 12:38 a.m. UTC | #1
On Mon, Aug 22, 2016 at 07:40:08PM -0400, Tom Rini wrote:

> 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")
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh
index 043e5d0c0e49..93679cb21e88 100755
--- a/test/fs/fs-test.sh
+++ b/test/fs/fs-test.sh
@@ -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]}