coordination #71242: [epic] Unify validation in the installed system
Split functionality for validating partitioning in partitions_validator_utils into more reusable functions
We have created a package lib/partitions_validator_utils which group some functionality for validating partitioning, but we haven't thought much how this functions could be reused in others tests, for example:
- validate_partition_table should contain more clear the argument to be passed.
- Avoid conditional statements.
- Libraries should give us the information that we need running the commands, assertion should be done on the test itself.
- Wrap blkid/lsblk parsers with some parametrized function so it can be reused easily. lsblk has an option to be exported to json.
- subvolume validation might be move to a different library for btrfs actions.
- We could think to rename it to something like /lib/validators/partitioning.pm so package name will be validators::partitioning.
- Grep for 'lsbkl' and find all occurrences and try avoid duplication (if it is too much places to refactor then consider new ticket)
For example, we have this block of code with no relation with
sub validate_unpartitioned_space in lib/partitions_validator_utils.pm
In general we should split the functionality in this library to have more fine grain and document it with perlpod.