Skip to content

Commit

Permalink
Fix FILE-6344 bug (CISOfy#263)
Browse files Browse the repository at this point in the history
The result of mount command returns like
/proc on /proc type proc (rw,hidepid=2)

Witch means the regular expression should be '^/proc' not '^proc' or you can grep nothing. :P
  • Loading branch information
cnrat authored and mboelen committed Aug 18, 2016
1 parent 3270c31 commit 4368b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/tests_filesystems
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
# Proc should be mounted with 'hidepid=2' or 'hidepid=1' at least
LogText "Test: check proc mount with incorrect mount options"
FIND=$(mount | ${EGREPBINARY} "^proc" | ${EGREPBINARY} -o "hidepid=[0-9]")
FIND=$(mount | ${EGREPBINARY} "^/proc" | ${EGREPBINARY} -o "hidepid=[0-9]")
if [ "${FIND}" = "hidepid=2" ]; then
Display --indent 2 --text "- Testing proc mount" --result "${STATUS_OK}" --color GREEN
LogText "Result: proc mount mounted with hidepid=2"
Expand Down

0 comments on commit 4368b59

Please sign in to comment.