You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
4.7 KiB
121 lines
4.7 KiB
1 year ago
|
From 44a272e129174f72c4b150fec333011c4f9c7c69 Mon Sep 17 00:00:00 2001
|
||
|
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||
|
Date: Wed, 10 May 2023 14:26:08 +0200
|
||
|
Subject: [PATCH] test: merge TEST-51-ISSUE-16115 into TEST-07-PID1
|
||
|
|
||
|
(cherry picked from commit d8d8380a35c494b6cb7ec5ee12dbe93002bd2f2f)
|
||
|
|
||
|
Related: #2213521
|
||
|
---
|
||
|
test/TEST-51-ISSUE-16115/Makefile | 1 -
|
||
|
test/TEST-51-ISSUE-16115/test.sh | 10 ----------
|
||
|
.../issue16115-repro-1.service} | 0
|
||
|
.../issue16115-repro-2.service} | 0
|
||
|
.../issue16115-repro-3.service} | 0
|
||
|
test/units/testsuite-07.issue-16115.sh | 16 ++++++++++++++++
|
||
|
test/units/testsuite-51.service | 8 --------
|
||
|
test/units/testsuite-51.sh | 15 ---------------
|
||
|
8 files changed, 16 insertions(+), 34 deletions(-)
|
||
|
delete mode 120000 test/TEST-51-ISSUE-16115/Makefile
|
||
|
delete mode 100755 test/TEST-51-ISSUE-16115/test.sh
|
||
|
rename test/{units/testsuite-51-repro-1.service => testsuite-07.units/issue16115-repro-1.service} (100%)
|
||
|
rename test/{units/testsuite-51-repro-2.service => testsuite-07.units/issue16115-repro-2.service} (100%)
|
||
|
rename test/{units/testsuite-51-repro-3.service => testsuite-07.units/issue16115-repro-3.service} (100%)
|
||
|
create mode 100755 test/units/testsuite-07.issue-16115.sh
|
||
|
delete mode 100644 test/units/testsuite-51.service
|
||
|
delete mode 100755 test/units/testsuite-51.sh
|
||
|
|
||
|
diff --git a/test/TEST-51-ISSUE-16115/Makefile b/test/TEST-51-ISSUE-16115/Makefile
|
||
|
deleted file mode 120000
|
||
|
index e9f93b1104..0000000000
|
||
|
--- a/test/TEST-51-ISSUE-16115/Makefile
|
||
|
+++ /dev/null
|
||
|
@@ -1 +0,0 @@
|
||
|
-../TEST-01-BASIC/Makefile
|
||
|
\ No newline at end of file
|
||
|
diff --git a/test/TEST-51-ISSUE-16115/test.sh b/test/TEST-51-ISSUE-16115/test.sh
|
||
|
deleted file mode 100755
|
||
|
index 7b306fa57b..0000000000
|
||
|
--- a/test/TEST-51-ISSUE-16115/test.sh
|
||
|
+++ /dev/null
|
||
|
@@ -1,10 +0,0 @@
|
||
|
-#!/usr/bin/env bash
|
||
|
-# SPDX-License-Identifier: LGPL-2.1-or-later
|
||
|
-set -e
|
||
|
-
|
||
|
-TEST_DESCRIPTION="Test ExecCondition= does not restart on abnormal or failure"
|
||
|
-
|
||
|
-# shellcheck source=test/test-functions
|
||
|
-. "${TEST_BASE_DIR:?}/test-functions"
|
||
|
-
|
||
|
-do_test "$@"
|
||
|
diff --git a/test/units/testsuite-51-repro-1.service b/test/testsuite-07.units/issue16115-repro-1.service
|
||
|
similarity index 100%
|
||
|
rename from test/units/testsuite-51-repro-1.service
|
||
|
rename to test/testsuite-07.units/issue16115-repro-1.service
|
||
|
diff --git a/test/units/testsuite-51-repro-2.service b/test/testsuite-07.units/issue16115-repro-2.service
|
||
|
similarity index 100%
|
||
|
rename from test/units/testsuite-51-repro-2.service
|
||
|
rename to test/testsuite-07.units/issue16115-repro-2.service
|
||
|
diff --git a/test/units/testsuite-51-repro-3.service b/test/testsuite-07.units/issue16115-repro-3.service
|
||
|
similarity index 100%
|
||
|
rename from test/units/testsuite-51-repro-3.service
|
||
|
rename to test/testsuite-07.units/issue16115-repro-3.service
|
||
|
diff --git a/test/units/testsuite-07.issue-16115.sh b/test/units/testsuite-07.issue-16115.sh
|
||
|
new file mode 100755
|
||
|
index 0000000000..8f638269cd
|
||
|
--- /dev/null
|
||
|
+++ b/test/units/testsuite-07.issue-16115.sh
|
||
|
@@ -0,0 +1,16 @@
|
||
|
+#!/usr/bin/env bash
|
||
|
+# SPDX-License-Identifier: LGPL-2.1-or-later
|
||
|
+set -eux
|
||
|
+set -o pipefail
|
||
|
+
|
||
|
+# Test ExecCondition= does not restart on abnormal or failure
|
||
|
+# Issue: https://github.com/systemd/systemd/issues/16115
|
||
|
+
|
||
|
+systemctl start issue16115-repro-1
|
||
|
+systemctl start issue16115-repro-2
|
||
|
+systemctl start issue16115-repro-3
|
||
|
+sleep 5 # wait a bit in case there are restarts so we can count them below
|
||
|
+
|
||
|
+[[ "$(systemctl show issue16115-repro-1 -P NRestarts)" == "0" ]]
|
||
|
+[[ "$(systemctl show issue16115-repro-2 -P NRestarts)" == "0" ]]
|
||
|
+[[ "$(systemctl show issue16115-repro-3 -P NRestarts)" == "0" ]]
|
||
|
diff --git a/test/units/testsuite-51.service b/test/units/testsuite-51.service
|
||
|
deleted file mode 100644
|
||
|
index c241262c27..0000000000
|
||
|
--- a/test/units/testsuite-51.service
|
||
|
+++ /dev/null
|
||
|
@@ -1,8 +0,0 @@
|
||
|
-# SPDX-License-Identifier: LGPL-2.1-or-later
|
||
|
-[Unit]
|
||
|
-Description=TEST-51-ISSUE-16115
|
||
|
-
|
||
|
-[Service]
|
||
|
-ExecStartPre=rm -f /failed /testok
|
||
|
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||
|
-Type=oneshot
|
||
|
diff --git a/test/units/testsuite-51.sh b/test/units/testsuite-51.sh
|
||
|
deleted file mode 100755
|
||
|
index e603d953a4..0000000000
|
||
|
--- a/test/units/testsuite-51.sh
|
||
|
+++ /dev/null
|
||
|
@@ -1,15 +0,0 @@
|
||
|
-#!/usr/bin/env bash
|
||
|
-# SPDX-License-Identifier: LGPL-2.1-or-later
|
||
|
-set -eux
|
||
|
-set -o pipefail
|
||
|
-
|
||
|
-systemctl start testsuite-51-repro-1
|
||
|
-systemctl start testsuite-51-repro-2
|
||
|
-systemctl start testsuite-51-repro-3
|
||
|
-sleep 5 # wait a bit in case there are restarts so we can count them below
|
||
|
-
|
||
|
-[[ "$(systemctl show testsuite-51-repro-1 -P NRestarts)" == "0" ]]
|
||
|
-[[ "$(systemctl show testsuite-51-repro-2 -P NRestarts)" == "0" ]]
|
||
|
-[[ "$(systemctl show testsuite-51-repro-3 -P NRestarts)" == "0" ]]
|
||
|
-
|
||
|
-touch /testok
|