From: Frantisek Sumsal Date: Wed, 10 May 2023 12:26:08 +0000 (+0200) Subject: test: merge TEST-51-ISSUE-16115 into TEST-07-PID1 X-Git-Tag: v254-rc1~512^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8d8380a35c494b6cb7ec5ee12dbe93002bd2f2f;p=thirdparty%2Fsystemd.git test: merge TEST-51-ISSUE-16115 into TEST-07-PID1 --- diff --git a/test/TEST-51-ISSUE-16115/Makefile b/test/TEST-51-ISSUE-16115/Makefile deleted file mode 120000 index e9f93b1104c..00000000000 --- 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 7b306fa57b9..00000000000 --- 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 00000000000..8f638269cd1 --- /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 c241262c277..00000000000 --- 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 e603d953a4f..00000000000 --- 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