teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0223-test-add-coverage-for-26467.patch

2aacef
From 4dbbdc956cb49804f9b451081eb7c442a689b1f1 Mon Sep 17 00:00:00 2001
2aacef
From: Frantisek Sumsal <frantisek@sumsal.cz>
2aacef
Date: Tue, 21 Feb 2023 19:15:13 +0100
2aacef
Subject: [PATCH] test: add coverage for #26467
2aacef
2aacef
(cherry picked from commit 4190124b3ca005830d893303bbc563baaf9984ed)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 test/units/testsuite-26.sh | 12 ++++++++++++
2aacef
 1 file changed, 12 insertions(+)
2aacef
2aacef
diff --git a/test/units/testsuite-26.sh b/test/units/testsuite-26.sh
2aacef
index 916a6704d7..debee91dde 100755
2aacef
--- a/test/units/testsuite-26.sh
2aacef
+++ b/test/units/testsuite-26.sh
2aacef
@@ -400,5 +400,17 @@ EOF
2aacef
     systemctl stop issue-24990
2aacef
 fi
2aacef
 
2aacef
+# %J in WantedBy= causes ABRT (#26467)
2aacef
+cat >/run/systemd/system/test-WantedBy.service <
2aacef
+[Service]
2aacef
+ExecStart=true
2aacef
+
2aacef
+[Install]
2aacef
+WantedBy=user-%i@%J.service
2aacef
+EOF
2aacef
+systemctl daemon-reload
2aacef
+systemctl enable --now test-WantedBy.service || :
2aacef
+systemctl daemon-reload
2aacef
+
2aacef
 touch /testok
2aacef
 rm /failed