diff options
author | Mateusz Kusiak <mateusz.kusiak@intel.com> | 2024-12-05 10:03:03 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mtkaczyk@kernel.org> | 2024-12-13 10:08:10 +0100 |
commit | cda8ffffb4d7e42c674328f87bed4c9f264673cf (patch) | |
tree | 7145a7d7b45c1685a9101f5e73e7afc0b4bd7a27 /tests | |
parent | tests: fix 07autodetect (diff) | |
download | mdadm-cda8ffffb4d7e42c674328f87bed4c9f264673cf.tar.xz mdadm-cda8ffffb4d7e42c674328f87bed4c9f264673cf.zip |
tests: fix 07autoassemble
Block device check in testdev() is not sufficient as it does not account
for symlinks. Fix the check to use lsblk instead. Add mdstat check for
better debugging TC and change md0 for md127 as that will be array name
after assembly.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/07autoassemble | 3 | ||||
-rw-r--r-- | tests/func.sh | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/07autoassemble b/tests/07autoassemble index b6630e17..5372b920 100644 --- a/tests/07autoassemble +++ b/tests/07autoassemble @@ -45,6 +45,7 @@ mdadm -CR $md2 -l1 -n2 $dev2 $dev3 mdadm -CR $md0 -l0 -n2 $md1 $md2 mdadm -Ss mdadm -As -c /dev/null +cat /proc/mdstat # For logs if [ $is_foreign == "yes" ]; then # md127 is md1 testdev $md127 1 $mdsize1a 64 @@ -55,6 +56,6 @@ if [ $is_foreign == "yes" ]; then else testdev $md1 1 $mdsize1a 64 testdev $md2 1 $mdsize1a 64 - testdev $md0 2 $mdsize11a 512 + testdev $md127 2 $mdsize11a 512 fi mdadm -Ss diff --git a/tests/func.sh b/tests/func.sh index 46d77eec..61a35a86 100644 --- a/tests/func.sh +++ b/tests/func.sh @@ -445,7 +445,7 @@ no_errors() { # basic device test testdev() { - [ -b $1 ] || die "$1 isn't a block device." + lsblk -no name $1 || die "$1 isn't a block device." [ "$DEVTYPE" == "disk" ] && return 0 udevadm settle dev=$1 |