mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: simplify line counting
No need for pipes
This commit is contained in:
parent
098bc780a2
commit
f55dc3006e
@ -34,7 +34,7 @@ if [ -z ${LVM_TEST_DEVICE_LIST+x} ]; then echo "LVM_TEST_DEVICE_LIST is unset" &
|
||||
|
||||
test -e "$LVM_TEST_DEVICE_LIST" || skip
|
||||
|
||||
num_devs=$(cat $LVM_TEST_DEVICE_LIST | wc -l)
|
||||
num_devs=$(wc -l < "$LVM_TEST_DEVICE_LIST")
|
||||
|
||||
RUNDIR="/run"
|
||||
test -d "$RUNDIR" || RUNDIR="/var/run"
|
||||
|
@ -59,7 +59,7 @@ sel() {
|
||||
return 1
|
||||
}
|
||||
|
||||
items_found=$(wc -l "$OUT_LOG_FILE" | cut -f 1 -d ' ')
|
||||
items_found=$(wc -l < "$OUT_LOG_FILE")
|
||||
|
||||
# the number of lines on output must match
|
||||
test "$items_found" -eq $# || {
|
||||
|
@ -40,7 +40,7 @@ fi
|
||||
|
||||
test -e "$LVM_TEST_DEVICE_LIST" || skip
|
||||
|
||||
num_devs=$(cat "$LVM_TEST_DEVICE_LIST" | wc -l)
|
||||
num_devs=$(wc -l < "$LVM_TEST_DEVICE_LIST")
|
||||
|
||||
RUNDIR="/run"
|
||||
test -d "$RUNDIR" || RUNDIR="/var/run"
|
||||
|
Loading…
Reference in New Issue
Block a user