Re: [PATCH mdadm] tests: Gate tests for linear flavor with variable LINEAR
From: Song Liu <song@kernel.org>
Date: 2024-01-05 23:18:21
Hi Mariusz, Thanks for these explanations. On Fri, Jan 5, 2024 at 1:58 AM Mariusz Tkaczyk [off-list ref] wrote:
[...]
It i just an example, I didn't test it. The final message depends on option you will choose. Mdadm is a kind of user interface for MD driver. I expect that not only developers are using this test suite. We need to keep it easy to use, messages should be meaningful and helpful.quoted
quoted
Another thing is "--raidtype=linear" option, is probably redundant now.Env variable are better implemented now than this --raidtype option. There is more work to do to make --raidtype fully valid because --raidtype uses filtering by test name. Test may define set of levels used, even if the name doesn't point to any level. So yes, I think that we can eventually remove --raidtype=linear as it is not really useful but I give it up to Song.
How about we add something like the following on top of this patch? Thanks, Song
diff --git i/test w/test
index b244453b1cec..49a36c3b8ef2 100755
--- i/test
+++ w/test@@ -140,6 +140,7 @@ do_help() { --raidtype=
raid0|linear|raid1|raid456|raid10|ddf|imsm
--disable-multipath Disable any tests
involving multipath
--disable-integrity Disable slow tests of
RAID[56] consistency
+ --disable-linear Disable any tests involving linear
--logdir=directory Directory to save all logfiles in
--save-logs Usually use with --logdir together
--keep-going | --no-error Don't stop on error, ie.
run all tests@@ -255,6 +256,9 @@ parse_args() { --disable-integrity ) unset INTEGRITY ;; + --disable-linear ) + unset LINEAR + ;; --dev=* ) case ${i##*=} in loop )
diff --git i/tests/func.sh w/tests/func.sh
index 5053b0121f1d..d7561f3c20cf 100644
--- i/tests/func.sh
+++ w/tests/func.sh@@ -123,6 +123,14 @@ check_env() { modprobe multipath 2> /dev/null grep -sq 'Personalities : .*multipath' /proc/mdstat && MULTIPATH="yes" + + # Check whether to run linear tests + modprobe linear 2> /dev/null + grep -sq 'Personalities : .*linear' /proc/mdstat && + LINEAR="yes" + if [ "$LINEAR" != "yes" ]; then + echo "test: skipping tests for linear, which is
removed in upstream 6.8+ kernels"
+ fi
}
do_setup() {