summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorKarel Zak2007-10-26 00:55:36 +0200
committerKarel Zak2007-10-26 01:02:45 +0200
commit32f7216b4c480e140a035c92319e527120d26616 (patch)
treea431a1f5a775aac0557fa4c6d331e9d12dba572d /tests/functions.sh
parenttailf: opened file leaving unclosed (diff)
downloadkernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.tar.gz
kernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.tar.xz
kernel-qcow2-util-linux-32f7216b4c480e140a035c92319e527120d26616.zip
tests: use losetup -s
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 7b555f5fe..660e4adfe 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -173,15 +173,13 @@ function ts_restore_cache {
function ts_device_init {
local IMAGE="$TS_OUTDIR/$TS_NAME.img"
- local IMAGE_RE=$( echo "$IMAGE" | sed 's:/:\\/:g' )
local DEV=""
ts_backup_cache
dd if=/dev/zero of="$IMAGE" bs=1M count=5 &> /dev/null
- $TS_CMD_LOSETUP -f "$IMAGE" 2>&1 >> $TS_OUTPUT
- DEV=$( $TS_CMD_LOSETUP -a | $AWK 'BEGIN {FS=":"} /'$IMAGE_RE'/ { print $1 }' )
+ DEV=$($TS_CMD_LOSETUP -s -f "$IMAGE")
if [ -z "$DEV" ]; then
ts_device_deinit $DEV