HADOOP-12206. The preceding invocations of findlargest in test-patch effect the following invocation results (Kengo Seki via aw)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2253f1f8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2253f1f8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2253f1f8 Branch: refs/heads/HADOOP-12111 Commit: 2253f1f8fff00f919e526c5004b5b54afd3bff35 Parents: ccc25a9 Author: Allen Wittenauer <[email protected]> Authored: Fri Jul 10 08:27:00 2015 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Fri Jul 10 08:27:00 2015 -0700 ---------------------------------------------------------------------- dev-support/test-patch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2253f1f8/dev-support/test-patch.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 3cb2b4b..8e139d3 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -465,11 +465,13 @@ function findlargest local a=("$@") local sizeofa=${#a[@]} local i=0 + local string + local maxlen=0 - until [[ ${i} -gt ${sizeofa} ]]; do + until [[ ${i} -eq ${sizeofa} ]]; do # shellcheck disable=SC2086 string=$( echo ${a[$i]} | cut -f$((column + 1)) -d\| ) - if [[ ${#string} -gt $maxlen ]]; then + if [[ ${#string} -gt ${maxlen} ]]; then maxlen=${#string} fi i=$((i+1))
