There are two issues with 10ddf-create:
- get_rootdev() failed if test was run in VM. Simplify and refactor the
function.
- tests fails at assemble due to segfault. Mark test as broken to clear
the CI.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
--- /dev/null
+Fails due to segmentation fault at assemble.
+
+Too much effort to diagnose this now, marking as broken to make CI clear.
+ ++ /usr/sbin/mdadm -A /dev/md/ddf0 /dev/loop8 /dev/loop9 /dev/loop10 /dev/loop11 /dev/loop12
+ ./test: line 76: 101955 Segmentation fault (core dumped) $mdadm "$@" 2> $targetdir/stderr
}
get_rootdev() {
- local dev=$(stat -c %D /)
- local maj=$(expr $dev : '\(..*\)..')
- local min=${dev#$maj}
- local bd=/dev/$(basename $(readlink /sys/dev/block/$((0x$maj)):$((0x$min))))
+ local part=$(grep ' / ' /proc/mounts | awk '{print $1}')
+ local bd=/dev/$(lsblk -no PKNAME $part)
[ -b $bd ] || exit 1
echo $bd
}