# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
-if [[ ! -f /usr/lib/systemd/system/systemd-mountfsd.socket ]] || \
- [[ ! -f /usr/lib/systemd/system/systemd-nsresourced.socket ]] || \
- ! command -v mksquashfs || \
+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 . || \
- systemd-analyze compare-versions "$(uname -r)" lt 6.5 || \
+ ! 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 mountfsd/nsresourced tests"
exit 0
sleep 1
- if [[ "$(systemctl is-failed tmp-hoge.mount)" == "failed" ]] || \
+ if [[ "$(systemctl is-failed tmp-hoge.mount)" == "failed" ]] ||
journalctl --since="$since" -u tmp-hoge.mount -q --grep "but there is no mount"; then
- exit 1
+ exit 1
fi
systemctl stop tmp-hoge.mount