Whamcloud - gitweb
LU-10562 tests: fix non-portable bash redirection 50/31050/2
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 26 Jan 2018 22:20:51 +0000 (15:20 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 31 Jan 2018 05:56:49 +0000 (05:56 +0000)
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 <andreas.dilger@intel.com>
Change-Id: I8289a4a3a1518c3cb6f33e2d8e52ba22db3ebbe5
Reviewed-on: https://review.whamcloud.com/31050
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index dce54bb..aec099a 100755 (executable)
@@ -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[@]}"