代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 471f790115b2b0a56328cbf14a6e0f51c1176b62 Mon Sep 17 00:00:00 2001
From: "Greg \"GothAck\" Miell" <[email protected]>
Date: Fri, 27 Dec 2019 14:36:49 +0000
Subject: [PATCH] Add failing test to show service.d global drop-in does not
get overridden by more specific dropins
(cherry picked from commit f5dd6e50a781b83bc6b1d8e018783661142aabd0)
Related: #2156620
---
test/TEST-15-DROPIN/test-dropin.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/test/TEST-15-DROPIN/test-dropin.sh b/test/TEST-15-DROPIN/test-dropin.sh
index 5419169f7b..a9d1ef0a10 100755
--- a/test/TEST-15-DROPIN/test-dropin.sh
+++ b/test/TEST-15-DROPIN/test-dropin.sh
@@ -118,6 +118,31 @@ EOF
clear_services a b c
}
+test_hierarchical_dropins () {
+ echo "Testing hierarchical dropins..."
+ echo "*** test service.d/ top level drop-in"
+ create_services a-b-c
+ check_ko a-b-c ExecCondition "/bin/echo service.d"
+ check_ko a-b-c ExecCondition "/bin/echo a-.service.d"
+ check_ko a-b-c ExecCondition "/bin/echo a-b-.service.d"
+ check_ko a-b-c ExecCondition "/bin/echo a-b-c.service.d"
+
+ for dropin in service.d a-.service.d a-b-.service.d a-b-c.service.d; do
+ mkdir -p /usr/lib/systemd/system/$dropin
+ echo "
+[Service]
+ExecCondition=/bin/echo $dropin
+ " >/usr/lib/systemd/system/$dropin/override.conf
+ systemctl daemon-reload
+ check_ok a-b-c ExecCondition "/bin/echo $dropin"
+ done
+ for dropin in service.d a-.service.d a-b-.service.d a-b-c.service.d; do
+ rm -rf /usr/lib/systemd/system/$dropin
+ done
+
+ clear_services a-b-c
+}
+
test_template_dropins () {
echo "Testing template dropins..."
@@ -303,6 +328,7 @@ test_invalid_dropins () {
}
test_basic_dropins
+test_hierarchical_dropins
test_template_dropins
test_alias_dropins
test_masked_dropins
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。