mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Eliminate trailing spaces in DISKS
The zfs-tests.sh driver script could add spaces to the end of $DISKS which defeates shell-based parsing with constructs such as ${DISKS##* }. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Issue #6900
This commit is contained in:
parent
93b43af10d
commit
5c596ba7a4
@ -505,7 +505,11 @@ if [ -z "${DISKS}" ]; then
|
||||
[ -f "$TEST_FILE" ] && fail "Failed file exists: ${TEST_FILE}"
|
||||
truncate -s "${FILESIZE}" "${TEST_FILE}" ||
|
||||
fail "Failed creating: ${TEST_FILE} ($?)"
|
||||
DISKS="$DISKS$TEST_FILE "
|
||||
if [[ "$DISKS" ]]; then
|
||||
DISKS="$DISKS $TEST_FILE"
|
||||
else
|
||||
DISKS="$TEST_FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
@ -522,7 +526,11 @@ if [ -z "${DISKS}" ]; then
|
||||
fail "Failed: ${TEST_FILE} -> ${TEST_LOOPBACK}"
|
||||
LOOPBACKS="${LOOPBACKS}${TEST_LOOPBACK} "
|
||||
BASELOOPBACKS=$(basename "$TEST_LOOPBACK")
|
||||
DISKS="$DISKS$BASELOOPBACKS "
|
||||
if [[ "$DISKS" ]]; then
|
||||
DISKS="$DISKS $BASELOOPBACKS"
|
||||
else
|
||||
DISKS="$BASELOOPBACKS"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user