1
0
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:
Zdenek Kabelac 2023-10-15 21:47:36 +02:00
parent 098bc780a2
commit f55dc3006e
3 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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 $# || {

View File

@ -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"