All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized
@ 2016-07-27  5:44 Li Wang
  2016-07-27  5:44 ` [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M Li Wang
  2016-07-27  9:17 ` [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized Cyril Hrubis
  0 siblings, 2 replies; 6+ messages in thread
From: Li Wang @ 2016-07-27  5:44 UTC (permalink / raw)
  To: ltp

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/lib/test.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
index 23d68c6..10a3ea7 100644
--- a/testcases/lib/test.sh
+++ b/testcases/lib/test.sh
@@ -257,6 +257,8 @@ ROD()
 
 tst_acquire_device()
 {
+	local dev_size=${1:-100}
+
 	if [ -z ${TST_TMPDIR} ]; then
 		tst_brkm "Use 'tst_tmpdir' before 'tst_acquire_device'"
 	fi
@@ -274,7 +276,7 @@ tst_acquire_device()
 		return
 	fi
 
-	ROD_SILENT dd if=/dev/zero of=test_dev.img bs=1024 count=102400
+	ROD_SILENT dd if=/dev/zero of=test_dev.img bs=1024 count=$(($dev_size*1024))
 
 	TST_DEVICE=$(losetup -f)
 	if [ $? -ne 0 ]; then
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-27 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27  5:44 [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized Li Wang
2016-07-27  5:44 ` [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M Li Wang
2016-07-27  9:22   ` Cyril Hrubis
2016-07-27  9:25     ` Cyril Hrubis
2016-07-27 10:28     ` Li Wang
2016-07-27  9:17 ` [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.