* [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
* [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M
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 ` Li Wang
2016-07-27 9:22 ` Cyril Hrubis
2016-07-27 9:17 ` [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized Cyril Hrubis
1 sibling, 1 reply; 6+ messages in thread
From: Li Wang @ 2016-07-27 5:44 UTC (permalink / raw)
To: ltp
Increase TST_DEVICE size to make btrfs-progs happy.
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/commands/mkfs/mkfs01.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
index eda9829..9a26899 100755
--- a/testcases/commands/mkfs/mkfs01.sh
+++ b/testcases/commands/mkfs/mkfs01.sh
@@ -32,7 +32,8 @@ setup()
tst_tmpdir
- tst_acquire_device
+ # set test_dev.img size
+ tst_acquire_device 256
TST_CLEANUP="cleanup"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized
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:17 ` Cyril Hrubis
1 sibling, 0 replies; 6+ messages in thread
From: Cyril Hrubis @ 2016-07-27 9:17 UTC (permalink / raw)
To: ltp
Hi!
> 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))
This is unfortunately not a complete solution. If we want to add
parameter(s) to tst_acquire_device() to specify minimal (and possibly
maximal) device size we have to check the $LTP_DEV device size and fall
back to loopback device if it's not in between the bounds, otherwise the
test will still fail if smaller than requested device was created in
runltp (which is the case at the moment).
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M
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
0 siblings, 2 replies; 6+ messages in thread
From: Cyril Hrubis @ 2016-07-27 9:22 UTC (permalink / raw)
To: ltp
Hi!
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
> testcases/commands/mkfs/mkfs01.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
> index eda9829..9a26899 100755
> --- a/testcases/commands/mkfs/mkfs01.sh
> +++ b/testcases/commands/mkfs/mkfs01.sh
> @@ -32,7 +32,8 @@ setup()
>
> tst_tmpdir
>
> - tst_acquire_device
> + # set test_dev.img size
> + tst_acquire_device 256
As far as I can tell 150MB should suffice as well, at least for me the
btrfs-progs v4.3.1+ requests at least 136MB. Or did they increase the
minimal size again?
And I guess that we should bump the size in runltp script as well.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M
2016-07-27 9:22 ` Cyril Hrubis
@ 2016-07-27 9:25 ` Cyril Hrubis
2016-07-27 10:28 ` Li Wang
1 sibling, 0 replies; 6+ messages in thread
From: Cyril Hrubis @ 2016-07-27 9:25 UTC (permalink / raw)
To: ltp
Hi!
> As far as I can tell 150MB should suffice as well, at least for me the
> btrfs-progs v4.3.1+ requests at least 136MB. Or did they increase the
^
Should have been v4.5.1+
The v4.3.1+ increased the minimal size to 100MB.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH 2/2] mkfs01: extend the loop device size to 256M
2016-07-27 9:22 ` Cyril Hrubis
2016-07-27 9:25 ` Cyril Hrubis
@ 2016-07-27 10:28 ` Li Wang
1 sibling, 0 replies; 6+ messages in thread
From: Li Wang @ 2016-07-27 10:28 UTC (permalink / raw)
To: ltp
On Wed, Jul 27, 2016 at 11:22:10AM +0200, Cyril Hrubis wrote:
> Hi!
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > ---
> > testcases/commands/mkfs/mkfs01.sh | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
> > index eda9829..9a26899 100755
> > --- a/testcases/commands/mkfs/mkfs01.sh
> > +++ b/testcases/commands/mkfs/mkfs01.sh
> > @@ -32,7 +32,8 @@ setup()
> >
> > tst_tmpdir
> >
> > - tst_acquire_device
> > + # set test_dev.img size
> > + tst_acquire_device 256
>
> As far as I can tell 150MB should suffice as well, at least for me the
> btrfs-progs v4.3.1+ requests at least 136MB. Or did they increase the
> minimal size again?
No, I just let to 256M in case that they increase that again.
>
> And I guess that we should bump the size in runltp script as well.
I didn't think of that.
Ok, Let me think it over and rewrite a new method.
Regards,
Li Wang
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox