* [LTP] [PATCH 1/1] prepare_lvm.sh: Allow to define tmp directory
@ 2020-08-24 10:24 Petr Vorel
2020-08-24 10:35 ` Martin Doucha
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2020-08-24 10:24 UTC (permalink / raw)
To: ltp
Many distros don't have enough /tmp size for LVM tests, thus
allow to set $LVM_DIR to use different temporary directory.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/misc/lvm/prepare_lvm.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testcases/misc/lvm/prepare_lvm.sh b/testcases/misc/lvm/prepare_lvm.sh
index e7f9c90e4..b6557f221 100755
--- a/testcases/misc/lvm/prepare_lvm.sh
+++ b/testcases/misc/lvm/prepare_lvm.sh
@@ -9,8 +9,9 @@ TST_NEEDS_ROOT=1
TST_NEEDS_CMDS="mount pvcreate vgcreate lvcreate"
. tst_test.sh
-LVM_TMPDIR="/tmp/ltp/growfiles"
-LVM_IMGDIR="/tmp/ltp/imgfiles"
+LVM_DIR="${LVM_DIR:-/tmp}"
+LVM_TMPDIR="$LVM_DIR/ltp/growfiles"
+LVM_IMGDIR="$LVM_DIR/ltp/imgfiles"
error_check()
{
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH 1/1] prepare_lvm.sh: Allow to define tmp directory
2020-08-24 10:24 [LTP] [PATCH 1/1] prepare_lvm.sh: Allow to define tmp directory Petr Vorel
@ 2020-08-24 10:35 ` Martin Doucha
2020-08-24 11:08 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Martin Doucha @ 2020-08-24 10:35 UTC (permalink / raw)
To: ltp
On 24. 08. 20 12:24, Petr Vorel wrote:
> Many distros don't have enough /tmp size for LVM tests, thus
> allow to set $LVM_DIR to use different temporary directory.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/misc/lvm/prepare_lvm.sh | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/misc/lvm/prepare_lvm.sh b/testcases/misc/lvm/prepare_lvm.sh
> index e7f9c90e4..b6557f221 100755
> --- a/testcases/misc/lvm/prepare_lvm.sh
> +++ b/testcases/misc/lvm/prepare_lvm.sh
> @@ -9,8 +9,9 @@ TST_NEEDS_ROOT=1
> TST_NEEDS_CMDS="mount pvcreate vgcreate lvcreate"
> . tst_test.sh
>
> -LVM_TMPDIR="/tmp/ltp/growfiles"
> -LVM_IMGDIR="/tmp/ltp/imgfiles"
> +LVM_DIR="${LVM_DIR:-/tmp}"
> +LVM_TMPDIR="$LVM_DIR/ltp/growfiles"
> +LVM_IMGDIR="$LVM_DIR/ltp/imgfiles"
>
> error_check()
> {
>
You should change only LVM_IMGDIR where the backing files are stored. If
you also change LVM_TMPDIR, it'll break the lvm.local runfile.
Also don't forget to update cleanup_lvm.sh.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH 1/1] prepare_lvm.sh: Allow to define tmp directory
2020-08-24 10:35 ` Martin Doucha
@ 2020-08-24 11:08 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2020-08-24 11:08 UTC (permalink / raw)
To: ltp
Hi Martin,
...
> You should change only LVM_IMGDIR where the backing files are stored. If
> you also change LVM_TMPDIR, it'll break the lvm.local runfile.
Wouldn't be less confusing to change both directories? Updating
generate_lvm_runfile.sh is trivial (ignoring variable setup in all 3 scripts):
- sed -e "s/{fsname}/$fsname/g" "$INFILE" >>"$OUTFILE"
+ sed -e "s/{fsname}/$fsname/g; s^/tmp/ltp/^$LVM_DIR/ltp^g" "$INFILE" >>"$OUTFILE"
> Also don't forget to update cleanup_lvm.sh.
Good point, thanks!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-24 11:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-24 10:24 [LTP] [PATCH 1/1] prepare_lvm.sh: Allow to define tmp directory Petr Vorel
2020-08-24 10:35 ` Martin Doucha
2020-08-24 11:08 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox