From: Andreas Dilger Date: Fri, 26 Jan 2018 22:20:51 +0000 (-0700) Subject: LU-10562 tests: fix non-portable bash redirection X-Git-Tag: 2.10.58~32 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=98ddc99376680817b2c10e3b66d0adf82dd221f2;p=fs%2Flustre-release.git LU-10562 tests: fix non-portable bash redirection Replace non-portable bash redirection with a simple(r) array assignment. This was reporting for at least bash 4.4.26: line 5211: syntax error near unexpected token `<' Signed-off-by: Andreas Dilger Change-Id: I8289a4a3a1518c3cb6f33e2d8e52ba22db3ebbe5 Reviewed-on: https://review.whamcloud.com/31050 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Cliff White Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index dce54bb..aec099a 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5206,9 +5206,7 @@ test_56wb() { echo "done." echo -n "Detecting existing pools..." - while IFS='' read thispool; do - pool_list+=("$thispool") - done < <($LFS pool_list $MOUNT | awk -F '.' 'NR>=2 { print $2 }') + pool_list=($($LFS pool_list $FSNAME | grep "$FSNAME\." | cut -d. -f2)) if [ ${#pool_list[@]} -gt 0 ]; then echo "${pool_list[@]}"