1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

tests: check.sh drop unnecessary $

$/${} is unnecessary on arithmetic variables.
This commit is contained in:
Zdenek Kabelac 2017-06-29 09:37:20 +02:00
parent c0197040a5
commit db338c2b42

View File

@ -208,14 +208,14 @@ in_sync() {
# 6th argument is the sync ratio for RAID # 6th argument is the sync ratio for RAID
idx=6 idx=6
type=${a[3]} type=${a[3]}
if [ "${a[$(($idx + 1))]}" != "idle" ]; then if [ "${a[$(( idx + 1 ))]}" != "idle" ]; then
echo "$lvm_name ($type$snap) is not in-sync" echo "$lvm_name ($type$snap) is not in-sync"
return 1 return 1
fi fi
;; ;;
"mirror") "mirror")
# 4th Arg tells us how far to the sync ratio # 4th Arg tells us how far to the sync ratio
idx=$((${a[3]} + 4)) idx=$(( a[3] + 4 ))
type=${a[2]} type=${a[2]}
;; ;;
*) *)
@ -230,7 +230,7 @@ in_sync() {
return 1 return 1
fi fi
if [[ ${a[$(($idx - 1))]} =~ a ]] ; then if [[ ${a[$(( idx - 1 ))]} =~ a ]] ; then
[ $ignore_a -eq 0 ] && \ [ $ignore_a -eq 0 ] && \
die "$lvm_name ($type$snap) in-sync, but 'a' characters in health status" die "$lvm_name ($type$snap) in-sync, but 'a' characters in health status"
echo "$lvm_name ($type$snap) is not in-sync" echo "$lvm_name ($type$snap) is not in-sync"