[LTP] [PATCH 1/1] generate_lvm_runfile.sh: Fix bashism
Petr Vorel
pvorel@suse.cz
Wed Aug 3 19:57:52 CEST 2022
ERR is not on dash (tested on 0.5.11).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/misc/lvm/generate_lvm_runfile.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/misc/lvm/generate_lvm_runfile.sh b/testcases/misc/lvm/generate_lvm_runfile.sh
index 72b286a69..5bf5d91d6 100755
--- a/testcases/misc/lvm/generate_lvm_runfile.sh
+++ b/testcases/misc/lvm/generate_lvm_runfile.sh
@@ -13,7 +13,7 @@ LVM_TMPDIR="$LVM_DIR/ltp/growfiles"
generate_runfile()
{
- trap 'tst_brk TBROK "Cannot create LVM runfile"' ERR
+ trap '[ $? -eq 0 ] && exit 0 || tst_brk TBROK "Cannot create LVM runfile"' EXIT
INFILE="$LTPROOT/testcases/data/lvm/runfile.tpl"
OUTFILE="$LTPROOT/runtest/lvm.local"
FS_LIST=`tst_supported_fs`
--
2.37.1
More information about the ltp
mailing list