mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test: merge TEST-51-ISSUE-16115 into TEST-07-PID1
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../TEST-01-BASIC/Makefile
|
||||
@@ -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 "$@"
|
||||
16
test/units/testsuite-07.issue-16115.sh
Executable file
16
test/units/testsuite-07.issue-16115.sh
Executable file
@@ -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" ]]
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user