]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: merge TEST-51-ISSUE-16115 into TEST-07-PID1
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 10 May 2023 12:26:08 +0000 (14:26 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 10 May 2023 19:26:26 +0000 (21:26 +0200)
test/TEST-51-ISSUE-16115/Makefile [deleted symlink]
test/TEST-51-ISSUE-16115/test.sh [deleted file]
test/testsuite-07.units/issue16115-repro-1.service [moved from test/units/testsuite-51-repro-1.service with 100% similarity]
test/testsuite-07.units/issue16115-repro-2.service [moved from test/units/testsuite-51-repro-2.service with 100% similarity]
test/testsuite-07.units/issue16115-repro-3.service [moved from test/units/testsuite-51-repro-3.service with 100% similarity]
test/units/testsuite-07.issue-16115.sh [new file with mode: 0755]
test/units/testsuite-51.service [deleted file]
test/units/testsuite-51.sh [deleted file]

diff --git a/test/TEST-51-ISSUE-16115/Makefile b/test/TEST-51-ISSUE-16115/Makefile
deleted file mode 120000 (symlink)
index e9f93b1..0000000
+++ /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 (executable)
index 7b306fa..0000000
+++ /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-07.issue-16115.sh b/test/units/testsuite-07.issue-16115.sh
new file mode 100755 (executable)
index 0000000..8f63826
--- /dev/null
@@ -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 (file)
index c241262..0000000
+++ /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 (executable)
index e603d95..0000000
+++ /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