diff options
author | Luca Boccassi <bluca@debian.org> | 2024-09-12 18:46:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-09-13 17:32:00 +0200 |
commit | 00f546e25e8e46e5e289e1f2fc2ed3dcc6999223 (patch) | |
tree | ab063fbf84837223929e389a426b5d2ce19b542d /test/units/TEST-50-DISSECT.dissect.sh | |
parent | Merge pull request #34402 from keszybz/notes-readme (diff) | |
download | systemd-00f546e25e8e46e5e289e1f2fc2ed3dcc6999223.tar.xz systemd-00f546e25e8e46e5e289e1f2fc2ed3dcc6999223.zip |
core: do not fail if ignorable img.v/ vpick dir is empty
If the vpick directory is configured to be ignored if missing, do not
fail and just skip ahead.
Follow-up for 5e79dd96a88
Follow-up for 622efc544dc
Diffstat (limited to '')
-rwxr-xr-x | test/units/TEST-50-DISSECT.dissect.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/units/TEST-50-DISSECT.dissect.sh b/test/units/TEST-50-DISSECT.dissect.sh index 15f663faf5..84b7c15bff 100755 --- a/test/units/TEST-50-DISSECT.dissect.sh +++ b/test/units/TEST-50-DISSECT.dissect.sh @@ -427,14 +427,15 @@ systemctl is-active testservice-50e.service # Check vpick support in ExtensionImages= VBASE="vtest$RANDOM" VDIR="/tmp/$VBASE.v" -mkdir "$VDIR" +EMPTY_VDIR="/tmp/$VBASE-empty.v" +mkdir "$VDIR" "$EMPTY_VDIR" ln -s /tmp/app0.raw "$VDIR/${VBASE}_0.raw" ln -s /tmp/app1.raw "$VDIR/${VBASE}_1.raw" -systemd-run -P -p ExtensionImages="$VDIR" bash -c '/opt/script1.sh | grep ID' +systemd-run -P -p ExtensionImages="$VDIR -$EMPTY_VDIR" bash -c '/opt/script1.sh | grep ID' -rm -rf "$VDIR" +rm -rf "$VDIR" "$EMPTY_VDIR" # ExtensionDirectories will set up an overlay mkdir -p "$IMAGE_DIR/app0" "$IMAGE_DIR/app1" "$IMAGE_DIR/app-nodistro" "$IMAGE_DIR/service-scoped-test" @@ -502,14 +503,15 @@ systemctl is-active testservice-50f.service # Check vpick support in ExtensionDirectories= VBASE="vtest$RANDOM" VDIR="/tmp/$VBASE.v" -mkdir "$VDIR" +EMPTY_VDIR="/tmp/$VBASE-empty.v" +mkdir "$VDIR" "$EMPTY_VDIR" ln -s "$IMAGE_DIR/app0" "$VDIR/${VBASE}_0" ln -s "$IMAGE_DIR/app1" "$VDIR/${VBASE}_1" -systemd-run -P --property ExtensionDirectories="$VDIR" cat /opt/script1.sh | grep -q -F "extension-release.app2" +systemd-run -P --property ExtensionDirectories="$VDIR -$EMPTY_VDIR" cat /opt/script1.sh | grep -q -F "extension-release.app2" -rm -rf "$VDIR" +rm -rf "$VDIR" "$EMPTY_VDIR" systemd-dissect --umount "$IMAGE_DIR/app0" systemd-dissect --umount "$IMAGE_DIR/app1" |