[LTP] [COMMITTED] [PATCH 4/6] test.sh: Remove tst_{acquire, release}_device, tst_mkfs
Cyril Hrubis
chrubis@suse.cz
Mon Feb 13 17:35:48 CET 2017
There are not used by any test that uses test.sh library.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
---
testcases/lib/test.sh | 52 ---------------------------------------------------
1 file changed, 52 deletions(-)
diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
index 48172d3..2e4d868 100644
--- a/testcases/lib/test.sh
+++ b/testcases/lib/test.sh
@@ -288,58 +288,6 @@ EXPECT_FAIL()
fi
}
-tst_acquire_device()
-{
- local acq_dev_size=${1:-150}
-
- if [ -z ${TST_TMPDIR} ]; then
- tst_brkm "Use 'tst_tmpdir' before 'tst_acquire_device'"
- fi
-
- ltp_dev_size=$((`blockdev --getsize64 $LTP_DEV`/1024/1024))
-
- if [ -n "${LTP_DEV}" ] && [ ${acq_dev_size} -le ${ltp_dev_size} ]; then
- tst_resm TINFO "Using test device LTP_DEV='${LTP_DEV}'"
- if [ ! -b ${LTP_DEV} ]; then
- tst_brkm TBROK "${LTP_DEV} is not a block device"
- fi
-
- ROD_SILENT dd if=/dev/zero of="${LTP_DEV}" bs=1024 count=512
-
- TST_DEVICE=${LTP_DEV}
- TST_DEVICE_FLAG=0
- return
- fi
-
- ROD_SILENT dd if=/dev/zero of=test_dev.img bs=1024 count=$((1024*$acq_dev_size))
-
- TST_DEVICE=$(losetup -f)
- if [ $? -ne 0 ]; then
- tst_brkm TBROK "Couldn't find free loop device"
- fi
-
- tst_resm TINFO "Found free device '${TST_DEVICE}'"
-
- ROD_SILENT losetup ${TST_DEVICE} test_dev.img
-
- TST_DEVICE_FLAG=1
-}
-
-tst_release_device()
-{
- if [ ${TST_DEVICE_FLAG} -eq 0 ]; then
- return
- fi
-
- losetup -a | grep -q ${TST_DEVICE}
- if [ $? -eq 0 ]; then
- losetup -d ${TST_DEVICE}
- if [ $? -ne 0 ];then
- tst_resm TWARN "'losetup -d ${TST_DEVICE}' failed"
- fi
- fi
-}
-
tst_mkfs()
{
local fs_type=$1
--
2.10.2
More information about the ltp
mailing list