diff --git a/include/tests_filesystems b/include/tests_filesystems index f4b2ad73..02f06d07 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -542,6 +542,35 @@ fi # ################################################################################# +# + # Test : FILE-xyzz + # Description : Bind mount the /var/tmp directory to /tmp +# +################################################################################# +# + Register --test-no FILE-xyzz --os Linux --weight L --network NO --description "Checking /var/tmp is bind to /tmp" + if [ ${SKIPTEST} -eq 0 ]; then + if [ -f /etc/fstab ]; then + FIND=`cat /etc/fstab | awk '{ if ($2=="/var/tmp") { print $4 } }'` + BIND=`echo ${FIND} | awk '{ if ($1 ~ "bind") { print "YES" } else { print "NO" } }'` + + if [ ! "${FIND}" = "" ]; then + LogText "Result: mount system /var/tmp is configured with options: ${FIND}" + if [ "${BIND}" = "YES" ]; then + Display --indent 2 --text "- /var/tmp is bind to /tmp" --result OK --color GREEN + LogText "Result : /var/tmp is bind to /tmp" + else + Display --indent 2 --text "- /var/tmp is not bind to /tmp" --result "NON DEFAULT" --color RED + LogText "Result: /var/tmp is not bind to /tmp" + fi + else + LogText "Result: no mount point /var/tmp or expected options found" + Display --indent 2 --text "- /var/tmp is not bind to /tmp" --result "NON DEFAULT" --color RED + fi + fi + fi +# +################################################################################# # # Test : FILE-6378 # Description : Check for nodirtime option