Add test FILE-6324 check XFS file systems (#699)

This commit is contained in:
Capashenn 2019-04-02 07:46:04 +02:00 committed by Michael Boelen
parent d0df518426
commit 7b7086566d
1 changed files with 22 additions and 0 deletions

View File

@ -163,6 +163,28 @@
fi
#
#################################################################################
#
# Test : FILE-6324
# Description : Checking Linux XFS file systems
Register --test-no FILE-6324 --os Linux --weight L --network NO --category security --description "Checking XFS file systems"
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: Checking for Linux XFS file systems"
FIND=$(${MOUNTBINARY} -t xfs | ${AWKBINARY} '{ print $3","$5 }')
if [ ! -z "${FIND}" ]; then
LogText "Result: found one or more XFS file systems"
for I in ${FIND}; do
FILESYSTEM=$(echo ${I} | ${CUTBINARY} -d ',' -f1)
FILETYPE=$(echo ${I} | ${CUTBINARY} -d ',' -f2)
LogText "File system: ${FILESYSTEM} (type: ${FILETYPE})"
Report "file_systems_xfs[]=${FILESYSTEM}|${FILETYPE}|"
done
else
LogText "Result: no XFS file systems found"
Report "file_systems_xfs[]=none"
fi
fi
#
#################################################################################
#
# Test : FILE-6329
# Description : Query all FFS/UFS mounts from /etc/fstab