Skip to contentSkip to conversation

LVM: Drop legacy scripts and runtest files

RFC PATCH New Petr Vorel 2 participants 6 messages May 28, 2020

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

cover LVM: Drop legacy scripts and runtest files

Hi,

I guess there is no doubt, that new implementation is better thus no need for legacy version. I hope that dropping legacy fs is ok (if not we should support them in new API).

Kind regards,
Petr

Petr Vorel (2):
LVM: Don't require root for generate_lvm_runfile.sh
LVM: Drop legacy scripts and runtest files

 doc/ltp-run-files.txt                      |   4 +-
 runtest/lvm.part1                          | 217 ---------------------
 runtest/lvm.part2                          |  72 -------
 testcases/misc/lvm/generate_lvm_runfile.sh |   1 -
 testscripts/ltpfslvm.sh                    | 200 -------------------
 testscripts/ltpfsnolvm.sh                  | 150 --------------
 6 files changed, 1 insertion(+), 643 deletions(-)
 delete mode 100644 runtest/lvm.part1
 delete mode 100644 runtest/lvm.part2
 delete mode 100755 testscripts/ltpfslvm.sh
 delete mode 100755 testscripts/ltpfsnolvm.sh
Signature · 1 line
2.26.2
author
#1 lore raw

RFC PATCH 1/2 LVM: Don't require root for generate_lvm_runfile.sh

LTPROOT can be in user writable directory. Having rights for make install is user responsibility, it does not have to be guarded by TST_NEEDS_ROOT=1.

Fixes 45289e498 ("Add LVM support scripts")
---
 testcases/misc/lvm/generate_lvm_runfile.sh | 1 -
 1 file changed, 1 deletion(-)
testcases/misc/lvm/generate_lvm_runfile.sh +0 -1
index 5ca035f22..b3366cb99 100755
@@ -5,7 +5,6 @@
 # Generate LTP runfile for LVM tests (runtest/lvm.local)
 
 TST_TESTFUNC=generate_runfile
-TST_NEEDS_ROOT=1
 TST_NEEDS_CMDS="sed"
 . tst_test.sh
 
Signature · 1 line
2.26.2
#2 lore raw

RFC PATCH 1/2 LVM: Don't require root for generate_lvm_runfile.sh

Quoted 3 lines · Petr Vorel

LTPROOT can be in user writable directory. Having rights for make install is user responsibility, it does not have to be guarded by TST_NEEDS_ROOT=1.

TST_NEEDS_ROOT=1 is there for tst_supported_fs. It won't find any mkfs programs if it's not running as root.

Signature · 7 lines
Martin Doucha   [email protected]
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
author
#3 lore raw

RFC PATCH 1/2 LVM: Don't require root for generate_lvm_runfile.sh

Quoted 7 lines · Petr Vorel
Quoted 3 lines

LTPROOT can be in user writable directory. Having rights for make install is user responsibility, it does not have to be guarded by TST_NEEDS_ROOT=1.

TST_NEEDS_ROOT=1 is there for tst_supported_fs. It won't find any mkfs programs if it's not running as root.

Right, thanks for info. Hm, there can be some tests which just want to know supported filesystems without running them and we have to require root for them.

There could be a solutions (tst_get_supported_fs_types() could have warning about PATH when user is not root and no mkfs.* found or just changing in has_mkfs() "mkfs.%s does not exist" to "mkfs.%s does not found" to give more obvious hint). But it's just a corner case issue, no need to bother with it.

Kind regards,
Petr

author
#4 lore raw

RFC PATCH 2/2 LVM: Drop legacy scripts and runtest files

In reply to Petr Vorel

These scripts were unmaintained and there is replacement added in 45289e498 ("Add LVM support scripts").

lvm.part{1,2} are in replaced by lvm.local generated before running, thus fix better to particular SUT.

ltpfslvm.sh / ltpfsnolvm.sh are replaced by lvmtest.sh.

We lose testing of legacy filesystems: MS-DOS, ReiserFS, Minix, JFS and ramdisk (not supported by new API).

---
 doc/ltp-run-files.txt     |   4 +-
 runtest/lvm.part1         | 217 --------------------------------------
 runtest/lvm.part2         |  72 -------------
 testscripts/ltpfslvm.sh   | 200 -----------------------------------
 testscripts/ltpfsnolvm.sh | 150 --------------------------
 5 files changed, 1 insertion(+), 642 deletions(-)
 delete mode 100644 runtest/lvm.part1
 delete mode 100644 runtest/lvm.part2
 delete mode 100755 testscripts/ltpfslvm.sh
 delete mode 100755 testscripts/ltpfsnolvm.sh
doc/ltp-run-files.txt +1 -3
index c29086987..70ad6c5a0 100644
@@ -56,9 +56,7 @@ if run network tests flag is passed these additional tests are run
  - nfs
 
 To test filesystem with LVM
-- ltpfslvm.sh
-w/o LVM
-- ltpfsnolvm.sh
+- testscripts/lvmtest.sh
 
 Device Mapper tests
  - ltpdmmapper.sh
runtest/lvm.part1 deleted +0 -217

217 lines not on this page · raw message

runtest/lvm.part2 deleted +0 -72

72 lines not on this page · raw message

testscripts/ltpfslvm.sh deleted +0 -200

200 lines not on this page · raw message

testscripts/ltpfsnolvm.sh deleted +0 -150

150 lines not on this page · raw message

Signature · 1 line
2.26.2
author
#5 lore raw

cover LVM: Drop legacy scripts and runtest files

In reply to Petr Vorel

Hi,

growfiles are used also in other runtest files: fs, fs_readonly, scsi_debug.part1. I wonder how to reduce duplicity for fs and fs_readonly.

runtest/scsi_debug.part1 should be IMHO deleted. And testscripts/ltp-scsi_debug.sh should be either deleted, or, if the idea is valid (using scsi_debug kernel module for testing), it should be rewritten.

Other candidate for deleting are ltpfs tests (testcases/kernel/fs/scsi/ltpfs/). They're not maintained, ltpfsio.sh and ltpfstest is not even installed.

Kind regards,
Petr