tests: dump more information about CFS and block devices

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-01-26 10:30:01 +01:00
parent 8b6019e65a
commit bf7e7d5c84
1 changed files with 27 additions and 1 deletions

View File

@ -691,15 +691,41 @@ function ts_fstype_by_devname {
return $?
}
function ts_vfs_dump {
if [ "$TS_SHOWDIFF" == "yes" -a "$TS_KNOWN_FAIL" != "yes" ]; then
echo
echo "{{{{ VFS dump:"
findmnt
echo "}}}}"
fi
}
function ts_blk_dump {
if [ "$TS_SHOWDIFF" == "yes" -a "$TS_KNOWN_FAIL" != "yes" ]; then
echo
echo "{{{{ blkdevs dump:"
lsblk -o+FSTYPE
echo "}}}}"
fi
}
function ts_device_has {
local TAG="$1"
local VAL="$2"
local DEV="$3"
local vl=""
local res=""
vl=$(ts_blkidtag_by_devname "$TAG" "$DEV")
test $? = 0 -a "$vl" = "$VAL"
return $?
res=$?
if [ "$res" != 0 ]; then
ts_vfs_dump
ts_blk_dump
fi
return $res
}
function ts_is_uuid()