From 739d81ddd005fae2bb82edce5b8a6173c7c48b34 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 10 Dec 2013 07:39:42 -0500 Subject: test: wrap $LOOPDEV in quotes Otherwise things go awry if it is not set ('[ -b ]' is not the same as '[ -b "" ]'!). --- test/test-functions | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/test-functions b/test/test-functions index 87d3a73e75..a9446e514a 100644 --- a/test/test-functions +++ b/test/test-functions @@ -124,18 +124,18 @@ install_missing_libraries() { } create_empty_image() { - rm -f $TESTDIR/rootdisk.img + rm -f "$TESTDIR/rootdisk.img" # Create the blank file to use as a root filesystem - dd if=/dev/null of=$TESTDIR/rootdisk.img bs=1M seek=200 + dd if=/dev/null of="$TESTDIR/rootdisk.img" bs=1M seek=200 LOOPDEV=$(losetup --show -P -f $TESTDIR/rootdisk.img) - [ -b $LOOPDEV ] || return 1 + [ -b "$LOOPDEV" ] || return 1 echo "LOOPDEV=$LOOPDEV" >> $STATEFILE - sfdisk -C 6400 -H 2 -S 32 -L $LOOPDEV <