]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: skip testsuite-50.mountnfsd if kernel/polkit are too old 32475/head
authorLuca Boccassi <bluca@debian.org>
Thu, 25 Apr 2024 10:57:09 +0000 (11:57 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 25 Apr 2024 12:32:35 +0000 (13:32 +0100)
Need full support of pidfd to work, so skip the test if it's not
available

test/TEST-50-DISSECT/test.sh
test/units/testsuite-50.mountnfsd.sh

index b93697b73c75af417d912e46bcae80a2dc27fd5c..a0cd677f075c3745fd27f17642c9d5bdfc8ba84a 100755 (executable)
@@ -36,6 +36,7 @@ test_append_files() {
     fi
     inst_binary mksquashfs
     inst_binary unsquashfs
+    inst_binary pkcheck
     install_verity_minimal
 }
 
index fea6b7d50b7acd5e98d3301762eba86596a28f92..59974e41e6265979d37f31cd21e3bc79b97e19dd 100755 (executable)
@@ -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