mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test: merge unit file related tests into TEST-23-UNIT-FILE
Rename TEST-23-TYPE-EXEC to TEST-23-UNIT-FILE and merge it with following tests: - TEST-37-RUNTIMEDIRECTORYPRESERV - TEST-40-EXEC-COMMAND-EX - TEST-41-ONESHOT-RESTART - TEST-42-EXECSTOPPOST - TEST-57-ONSUCCESS-UPHOLD
This commit is contained in:
committed by
Yu Watanabe
parent
97211510b0
commit
539af5c441
@@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
TEST_DESCRIPTION="test Type=exec"
|
||||
TEST_DESCRIPTION="Tests for various unit file settings"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
@@ -1 +0,0 @@
|
||||
../TEST-01-BASIC/Makefile
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
set -e
|
||||
|
||||
TEST_DESCRIPTION="test RuntimeDirectoryPreserve=yes"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -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 ExecReload= (PR #13098)"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -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 ExecXYZEx= service unit dbus hookups"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -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 oneshot unit restart on failure"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -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 that ExecStopPost= is always run"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -1 +0,0 @@
|
||||
../TEST-01-BASIC/Makefile
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
TEST_DESCRIPTION="test OnSuccess= + Uphold= + PropagatesStopTo= + BindsTo="
|
||||
# shellcheck source=test/test-functions
|
||||
. "$TEST_BASE_DIR/test-functions"
|
||||
|
||||
do_test "$@" 57
|
||||
@@ -1,10 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Unit with BindsTo=
|
||||
BindsTo=testsuite-57-bound-by.service
|
||||
After=testsuite-57-bound-by.service
|
||||
BindsTo=testsuite-23-bound-by.service
|
||||
After=testsuite-23-bound-by.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sleep infinity
|
||||
# --kill-who= (no 'm') to check that the short form is accepted
|
||||
ExecStopPost=systemctl kill --kill-who=main -sRTMIN+1 testsuite-57.service
|
||||
ExecStopPost=systemctl kill --kill-who=main -sRTMIN+1 testsuite-23.service
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Failing unit
|
||||
OnFailure=testsuite-57-uphold.service
|
||||
OnFailure=testsuite-23-uphold.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/false
|
||||
10
test/units/testsuite-23-prop-stop-one.service
Normal file
10
test/units/testsuite-23-prop-stop-one.service
Normal file
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Stop Propagation Receiver
|
||||
Wants=testsuite-23-prop-stop-two.service
|
||||
After=testsuite-23-prop-stop-two.service
|
||||
StopPropagatedFrom=testsuite-23-prop-stop-two.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sleep infinity
|
||||
ExecStopPost=systemctl kill --kill-whom=main -sUSR2 testsuite-23.service
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user