test: skip testsuite-50.mountnfsd if kernel/polkit are too old

Need full support of pidfd to work, so skip the test if it's not
available
This commit is contained in:
Luca Boccassi
2024-04-25 11:57:09 +01:00
parent c790537b89
commit f9419fe610
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@ test_append_files() {
fi
inst_binary mksquashfs
inst_binary unsquashfs
inst_binary pkcheck
install_verity_minimal
}
+3 -1
View File
@@ -10,7 +10,9 @@ if [[ ! -f /usr/lib/systemd/system/systemd-mountfsd.socket ]] || \
[[ ! -f /usr/lib/systemd/system/systemd-nsresourced.socket ]] || \
! command -v mksquashfs || \
! grep -q bpf /sys/kernel/security/lsm ||
! find /usr/lib* -name libbpf.so.1 2>/dev/null | grep .; then
! find /usr/lib* -name libbpf.so.1 2>/dev/null | grep . || \
systemd-analyze compare-versions "$(uname -r)" lt 6.5 || \
systemd-analyze compare-versions "$(pkcheck --version | awk '{print $3}')" lt 124; then
echo "Skipping mountnfsd/nsresourced tests"
exit 0
fi