]> git.ipfire.org Git - thirdparty/shadow.git/commit
tests/: implement feature detection
authorIker Pedrosa <ipedrosa@redhat.com>
Mon, 31 Mar 2025 15:49:22 +0000 (17:49 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Wed, 21 May 2025 08:04:42 +0000 (10:04 +0200)
commit8e02cff47522d046030df8c9d50be9129b50a2bd
tree8f6c0d333facb36433a3e7cc37db0688689e8c1f
parentd17e1133ee832129c54d1defaa8afc0580508ef8
tests/: implement feature detection

Implement a general function to detect features in shadow host.

Apparently, musl doesn't provide `getent gshadow`, but shadow still needs
it to check for several group attributes. Thus, check whether it exists
in the host, and if it does run it. If not, let's just skip that part of
the test.

Link: <https://gitlab.alpinelinux.org/alpine/aports/-/issues/16979>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Dan Lavu <dlavu@redhat.com>
tests/system/framework/hosts/shadow.py