test: add simple fstab credential test

This commit is contained in:
Lennart Poettering
2023-07-04 23:09:39 +02:00
parent 3a065dfc29
commit 51235f2fe6
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -304,6 +304,10 @@ systemd-run -p DynamicUser=yes -p 'LoadCredential=os:/etc/os-release' \
if ! systemd-detect-virt -q -c ; then
# Validate that the credential we inserted via the initrd logic arrived
test "$(systemd-creds cat --system myinitrdcred)" = "guatemala"
# Check that the fstab credential logic worked
test -d /injected
grep -q /injected /proc/self/mountinfo
fi
systemd-analyze log-level info