Skip to content

Commit

Permalink
tests/files: split types into separate arguments
Browse files Browse the repository at this point in the history
The version of `find` on RHCOS does not accept a comma-separated list
of file types to the `-type` argument. Splitting it into multiple args
should allow the test to work with FCOS/RHCOS.
  • Loading branch information
miabbott committed Nov 17, 2021
1 parent 7ad52c2 commit dac1f68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/kola/files/file-directory-permissions
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ fatal() {
exit 1
}

list="$(find /etc -type f,d -perm /022)"
list="$(find /etc -type f -type d -perm /022)"
if [[ -n "${list}" ]]; then
find /etc -type f,d -perm /022 -print0 | xargs -0 ls -al
find /etc -type f -type d -perm /022 -print0 | xargs -0 ls -al
fatal "found files or directories with 'g+w' or 'o+w' permission"
fi
ok "no files with 'g+w' or 'o+w' permission found in /etc"

0 comments on commit dac1f68

Please sign in to comment.