From 7b7086566da4b677470c13d65261719582a6bca5 Mon Sep 17 00:00:00 2001 From: Capashenn <37273010+Capashenn@users.noreply.github.com> Date: Tue, 2 Apr 2019 07:46:04 +0200 Subject: [PATCH] Add test FILE-6324 check XFS file systems (#699) --- include/tests_filesystems | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/tests_filesystems b/include/tests_filesystems index a52bb66b..e1be0a1f 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -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