]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/TEST-15-DROPIN/test-dropin.sh
shared/dropin: fix assert for invalid drop-in
[thirdparty/systemd.git] / test / TEST-15-DROPIN / test-dropin.sh
index fe424c158798d1263292087e582e63e125351760..fd500c1a0be885264e41ae6b9a5bc81a773ec866 100755 (executable)
@@ -419,9 +419,23 @@ EOF
     clear_services a b
 }
 
+test_invalid_dropins () {
+    echo "Testing invalid dropins..."
+    # Assertion failed on earlier versions, command exits unsuccessfully on later versions
+    systemctl cat nonexistent@.service || true
+    create_services a
+    systemctl daemon-reload
+    # Assertion failed on earlier versions, command exits unsuccessfully on later versions
+    systemctl cat a@.service || true
+    systemctl stop a
+    clear_services a
+    return 0
+}
+
 test_basic_dropins
 test_template_dropins
 test_alias_dropins
 test_masked_dropins
+test_invalid_dropins
 
 touch /testok