diff options
author | mboelen <michael@cisofy.com> | 2014-09-19 03:46:40 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-19 03:46:40 +0400 |
commit | fb53e586fe38fe4d4dfc615d4979e0d2077ac220 (patch) | |
tree | 532dacb1687fcbe56900e209846b270d01561ccd | |
parent | bba133afbb7d77f7382f98af3c3d5ab0e0bf15ca (diff) |
Added /proc/modules as dependency to KRNL-5723 and KRNL-5726
-rw-r--r-- | include/tests_kernel | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/tests_kernel b/include/tests_kernel index 8ea17455..69f975d1 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -175,7 +175,7 @@ # Description : Check if Linux is build as a monolithic kernel or not Register --test-no KRNL-5723 --os Linux --weight L --network NO --description "Determining if Linux kernel is monolithic" if [ ${SKIPTEST} -eq 0 ]; then - if [ ! "${LSMODBINARY}" = "" ]; then + if [ ! "${LSMODBINARY}" = "" -a -f /proc/modules ]; then logtext "Test: checking if kernel is monolithic or modular" # Checking if any modules are loaded FIND=`${LSMODBINARY} | grep -v "^Module" | wc -l | tr -s ' ' | tr -d ' '` @@ -190,8 +190,7 @@ MONOLITHIC_KERNEL=0 fi else - logtext "Test skipped, no lsmod binary found" - # Exception? + logtext "Test skipped, lsmod binary not found or /proc/modules can not be opened" fi fi # @@ -201,7 +200,7 @@ # Description : Checking Linux loaded kernel modules Register --test-no KRNL-5726 --os Linux --weight L --network NO --description "Checking Linux loaded kernel modules" if [ ${SKIPTEST} -eq 0 ]; then - if [ ! "${LSMODBINARY}" = "" ]; then + if [ ! "${LSMODBINARY}" = "" -a -f /proc/modules ]; then FIND=`lsmod | awk '{ if ($1!="Module") print $1 }' | sort` Display --indent 2 --text "- Checking loaded kernel modules" --result DONE --color GREEN if [ ! "${FIND}" = "" ]; then @@ -218,8 +217,7 @@ logtext "Notice: No loaded kernel modules could indicate a broken/malformed lsmod, or a (custom) monolithic kernel" fi else - logtext "Test skipped, no lsmod binary found" - # Exception? + logtext "Test skipped, lsmod binary not found or /proc/modules can not be opened" fi fi # |