diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-10 14:26:08 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-10 21:26:26 +0200 |
commit | d8d8380a35c494b6cb7ec5ee12dbe93002bd2f2f (patch) | |
tree | 90b4a1e0cc6c197265ef4513b8bed47c49ee1586 /test | |
parent | test: merge TEST-47-ISSUE-14566 into TEST-07-PID1 (diff) | |
download | systemd-d8d8380a35c494b6cb7ec5ee12dbe93002bd2f2f.tar.xz systemd-d8d8380a35c494b6cb7ec5ee12dbe93002bd2f2f.zip |
test: merge TEST-51-ISSUE-16115 into TEST-07-PID1
Diffstat (limited to 'test')
l--------- | test/TEST-51-ISSUE-16115/Makefile | 1 | ||||
-rwxr-xr-x | test/TEST-51-ISSUE-16115/test.sh | 10 | ||||
-rw-r--r-- | test/testsuite-07.units/issue16115-repro-1.service (renamed from test/units/testsuite-51-repro-1.service) | 0 | ||||
-rw-r--r-- | test/testsuite-07.units/issue16115-repro-2.service (renamed from test/units/testsuite-51-repro-2.service) | 0 | ||||
-rw-r--r-- | test/testsuite-07.units/issue16115-repro-3.service (renamed from test/units/testsuite-51-repro-3.service) | 0 | ||||
-rwxr-xr-x | test/units/testsuite-07.issue-16115.sh | 16 | ||||
-rw-r--r-- | test/units/testsuite-51.service | 8 | ||||
-rwxr-xr-x | test/units/testsuite-51.sh | 15 |
8 files changed, 16 insertions, 34 deletions
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 index 90252b388a..90252b388a 100644 --- a/test/units/testsuite-51-repro-1.service +++ b/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 index 7c65691029..7c65691029 100644 --- a/test/units/testsuite-51-repro-2.service +++ b/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 index c68f93d11d..c68f93d11d 100644 --- a/test/units/testsuite-51-repro-3.service +++ b/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 |