diff options
author | Karel Zak | 2009-01-20 00:24:23 +0100 |
---|---|---|
committer | Karel Zak | 2009-02-11 23:32:58 +0100 |
commit | 632830ccf28d06444c50d14708240506e6a6d1fc (patch) | |
tree | 43aabd52f06f68b9eb28e9a77f72a996cc1a8795 /tests/functions.sh | |
parent | tests: cleanup ts/script (diff) | |
download | kernel-qcow2-util-linux-632830ccf28d06444c50d14708240506e6a6d1fc.tar.gz kernel-qcow2-util-linux-632830ccf28d06444c50d14708240506e6a6d1fc.tar.xz kernel-qcow2-util-linux-632830ccf28d06444c50d14708240506e6a6d1fc.zip |
tests: cleanup ts/swapon
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 6dbbeb776..83af33cd1 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -88,7 +88,7 @@ function ts_init { TS_VERBOSE=$(ts_has_option "verbose" "$*") TS_HAS_VOLUMEID="no" - BLKID_FILE="$TS_OUTDIR/${TS_NS}.blkidtab" + BLKID_FILE="$TS_OUTDIR/${TS_TESTNAME}.blkidtab" [ -d "$TS_OUTDIR" ] || mkdir -p "$TS_OUTDIR" [ -d "$TS_DIFFDIR" ] || mkdir -p "$TS_DIFFDIR" @@ -183,19 +183,19 @@ function ts_die { } function ts_device_init { - local IMAGE="$TS_OUTDIR/${TS_NS}.img" - local DEV="" + local img="$TS_OUTDIR/${TS_TESTNAME}.img" + local dev="" - dd if=/dev/zero of="$IMAGE" bs=1M count=5 &> /dev/null + dd if=/dev/zero of="$img" bs=1M count=5 &> /dev/null - DEV=$($TS_CMD_LOSETUP -s -f "$IMAGE") + dev=$($TS_CMD_LOSETUP -s -f "$img") - if [ -z "$DEV" ]; then - ts_device_deinit $DEV + if [ -z "$dev" ]; then + ts_device_deinit $dev return 1 # error fi - echo $DEV + echo $dev return 0 # succes } |