tests: Rework 'find' calls with multiple file type filters#1405
tests: Rework 'find' calls with multiple file type filters#1405travier merged 2 commits intocoreos:testing-develfrom
Conversation
We could use |
|
Good catch on the use of |
Could idea. Made a new try. |
0616be6 to
3ae0ee6
Compare
|
This one is green but missing RHCOS testing. |
Fedora has a recent enough `find` command to be able to use the `-type f,d` option but that is not yet supported by `find` on RHEL. We can not use `-type f -type d` instead as this filters on entries being both a file and a directory which never happens. Thus we must explicitely duplicate the entire filters and actions and use `-o` to OR them. This reworks the tests using that option to be compatible on both FCOS and RHCOS. We can drop this change once RHCOS moves to RHEL 9. This also includes `/usr` in the file-directory-permissions test and tries to figure out which package the offending files/dires come from. Fixes: coreos@dac1f68
|
Updated with RHCOS support. Not pretty. Open to suggestions. |
cgwalters
left a comment
There was a problem hiding this comment.
Didn't review the find incantations in depth, but looks sane to me!
|
|
||
| # List of known files and directories with group write permission (RHCOS only) | ||
| list_known_rhcos=( | ||
| '/usr/share/licenses/publicsuffix-list-dafsa/COPYING' |
There was a problem hiding this comment.
Tempting to just canonicalize this in our ostree builds too.
There was a problem hiding this comment.
I've made https://gitlab.com/redhat/centos-stream/rpms/publicsuffix-list/-/merge_requests/2 for this one.
There was a problem hiding this comment.
But indeed, we can directly fix it in openshift/os too and drop this case from the test.
| '/usr/sbin/unix_chkpwd' | ||
| ) | ||
|
|
||
| # List of known files and directories with SetUID bit set (RHCOS only) |
There was a problem hiding this comment.
This is another case where we're saying "rhcos" but we really mean "rhel8".
Fedora has a recent enough
findcommand to be able to use the-type f,doption but that is not yet supported byfindon RHEL.We can not use
-type f -type dinstead as this filters on entriesbeing both a file and a directory which never happens.
Thus rework tests using that option to be compatible on both FCOS and
RHCOS. We can drop this change once RHCOS moves to RHEL 9.
Fixes: dac1f68