From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] test.sh: make the loop device size can be customized
Date: Wed, 27 Jul 2016 11:17:53 +0200 [thread overview]
Message-ID: <20160727091753.GA10645@rei.lan> (raw)
In-Reply-To: <1469598247-23993-1-git-send-email-liwang@redhat.com>
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
prev parent reply other threads:[~2016-07-27 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Cyril Hrubis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160727091753.GA10645@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox