Skip to content

Commit

Permalink
selftests: hsr: Use `let' properly.
Browse files Browse the repository at this point in the history
The timeout in the while loop is never subtracted due wrong usage of
`let' leading to an endless loop if the former condition never gets
true.

Put the statement for let in quotes so it is parsed as a single
statement.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sebastian Andrzej Siewior authored and David S. Miller committed Sep 18, 2023
1 parent fbd825f commit 5c3ce53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/hsr/hsr_ping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ do
break
fi
sleep 1
let WAIT = WAIT - 1
let "WAIT = WAIT - 1"
done

# Just a safety delay in case the above check didn't handle it.
Expand Down

0 comments on commit 5c3ce53

Please sign in to comment.