1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

tests: shellcheck misc

Few more minor complains from ShellCheck.
This commit is contained in:
Zdenek Kabelac 2018-03-23 17:01:13 +01:00
parent 1507956383
commit 3a48fb47b7
2 changed files with 4 additions and 4 deletions

View File

@ -240,10 +240,10 @@ in_sync() {
fi
if [[ ${a[$(( idx - 1 ))]} =~ a ]] ; then
[ $ignore_a -eq 0 ] && \
[ "$ignore_a" = 0 ] && \
die "$lvm_name ($type$snap) in-sync, but 'a' characters in health status"
echo "$lvm_name ($type$snap) is not in-sync"
[ $ignore_a -eq 1 ] && return 0
[ "$ignore_a" = 1 ] && return 0
return 1
fi

View File

@ -39,7 +39,7 @@ rand_bytes() {
# Ensure that $data has length at least 50+$n
while :; do
len=$(echo "$data" | wc -c)
len=${#data} # number of chars in $data
test "$n_plus_50" -le "$len" && break;
data=$( (echo "$data"; eval "$cmds") 2>&1 | gzip )
done
@ -112,7 +112,7 @@ stacktrace() {
# i=1 - ignoring innermost frame - it is always stacktrace function
local i=1 n=${#BASH_LINENO[*]}
# n-=1 - ignoring last frame as well - it is not interesting
let n-=1
n=$(( n - 1 ))
echo "## - $0:${BASH_LINENO[$((n-1))]}"
while [[ $i -lt $n ]]; do