mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 10:13:34 +08:00
test: Rename testsuite-XX units to match test name
Having these named differently than the test itself mostly creates unecessary confusion and makes writing logic against the tests harder so let's rename the testsuite-xx units and scripts to just use the test name itself.
This commit is contained in:
parent
5748f13e54
commit
7a321b5a21
@ -20,7 +20,7 @@ ExtraTrees=
|
||||
%O/minimal-1.root-%a.raw:/usr/share/minimal_1.raw
|
||||
%O/minimal-1.root-%a-verity.raw:/usr/share/minimal_1.verity
|
||||
%O/minimal-1.root-%a-verity-sig.raw:/usr/share/minimal_1.verity.sig
|
||||
%O/minimal-base:/usr/share/testsuite-13-container-template
|
||||
%O/minimal-base:/usr/share/TEST-13-NSPAWN-container-template
|
||||
|
||||
Packages=
|
||||
acl
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-03.units/succeeds-on-restart.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-03-JOBS.units/succeeds-on-restart.sh
|
||||
Restart=on-failure
|
||||
RestartMode=direct
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-03.units/succeeds-on-restart.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-03-JOBS.units/succeeds-on-restart.sh
|
||||
Restart=on-failure
|
||||
RestartMode=normal
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-03-JOBS.units']
|
||||
|
@ -8,3 +8,5 @@ integration_tests += [
|
||||
'storage' : 'persistent',
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-04-JOURNAL.units']
|
||||
|
@ -20,7 +20,7 @@ test_append_files() {
|
||||
# Since we nuke the journal repeatedly during this test, let's redirect
|
||||
# stdout/stderr to the console as well to make the test a bit more debug-able.
|
||||
if ! get_bool "${INTERACTIVE_DEBUG:-}"; then
|
||||
dropin_dir="${workspace:?}/etc/systemd/system/testsuite-04.service.d/"
|
||||
dropin_dir="${workspace:?}/etc/systemd/system/TEST-04-JOURNAL.service.d/"
|
||||
mkdir -p "$dropin_dir"
|
||||
printf '[Service]\nStandardOutput=journal+console\nStandardError=journal+console' >"$dropin_dir/99-stdout.conf"
|
||||
fi
|
||||
|
@ -10,3 +10,5 @@ integration_tests += [
|
||||
'firmware' : 'uefi',
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-06-SELINUX.units']
|
||||
|
@ -3,6 +3,6 @@
|
||||
Description=Issue 14566 Repro
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-07.units/%N.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-07-PID1.units/%N.sh
|
||||
ExecStopPost=/bin/true
|
||||
KillMode=mixed
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-07-PID1.units']
|
||||
|
@ -80,7 +80,7 @@ check_result_qemu_hook() {
|
||||
|
||||
# Setup a one shot service in initrd that creates a dummy bind mount under /run
|
||||
# to check if the mount persists though the initrd transition. The "check" part
|
||||
# is in the respective testsuite-08.sh script.
|
||||
# is in the respective TEST-08-INITRD.sh script.
|
||||
#
|
||||
# See: https://github.com/systemd/systemd/issues/28452
|
||||
run_qemu_hook() {
|
||||
|
@ -13,7 +13,7 @@ TEST_FORCE_NEWIMAGE=1
|
||||
|
||||
test_append_files() {
|
||||
local workspace="${1:?}"
|
||||
local container="$workspace/usr/share/testsuite-13-container-template"
|
||||
local container="$workspace/usr/share/TEST-13-NSPAWN-container-template"
|
||||
|
||||
# For virtual wlan interface.
|
||||
instmods mac80211_hwsim
|
||||
|
@ -10,4 +10,4 @@ TimeoutStartSec=4
|
||||
TimeoutStopSec=4
|
||||
RuntimeMaxSec=10
|
||||
Environment=SERVICE=fail_runtime extend_timeout_interval=5 sleep_interval=7 start_intervals=0 run_intervals=2 stop_intervals=0
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -11,4 +11,4 @@ TimeoutStartSec=10
|
||||
TimeoutStopSec=4
|
||||
RuntimeMaxSec=4
|
||||
Environment=SERVICE=fail_start extend_timeout_interval=5 sleep_interval=7 start_intervals=2 run_intervals=0 stop_intervals=0
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -10,7 +10,7 @@ TimeoutStartSec=4
|
||||
TimeoutStopSec=10
|
||||
RuntimeMaxSec=4
|
||||
Environment=SERVICE=fail_stop extend_timeout_interval=5 sleep_interval=7 start_intervals=0 run_intervals=0 stop_intervals=2
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
||||
# Due to 6041a7ee2c1bbff6301082f192fc1b0882400d42 SIGTERM isn't sent as the service shuts down with STOPPING=1
|
||||
# This file makes the test assess.sh quicker by notifing it that this test has finished.
|
||||
ExecStopPost=/bin/bash -c '[[ $SERVICE_RESULT == timeout && $EXIT_CODE == killed ]] && touch /fail_runtime.terminated'
|
@ -12,4 +12,4 @@ TimeoutStartSec=4
|
||||
TimeoutStopSec=4
|
||||
RuntimeMaxSec=4
|
||||
Environment=SERVICE=success_all extend_timeout_interval=4 sleep_interval=2 start_intervals=3 run_intervals=3 stop_intervals=3
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -11,4 +11,4 @@ TimeoutStartSec=4
|
||||
TimeoutStopSec=4
|
||||
RuntimeMaxSec=8
|
||||
Environment=SERVICE=success_runtime extend_timeout_interval=4 sleep_interval=6 start_intervals=0 run_intervals=1 stop_intervals=0
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -10,4 +10,4 @@ TimeoutStartSec=8
|
||||
TimeoutStopSec=4
|
||||
RuntimeMaxSec=4
|
||||
Environment=SERVICE=success_start extend_timeout_interval=4 sleep_interval=6 start_intervals=1 run_intervals=0 stop_intervals=0
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -10,4 +10,4 @@ TimeoutStartSec=4
|
||||
TimeoutStopSec=8
|
||||
RuntimeMaxSec=4
|
||||
Environment=SERVICE=success_stop extend_timeout_interval=4 sleep_interval=6 start_intervals=0 run_intervals=0 stop_intervals=1
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-16.units/extend-timeout.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-16-EXTEND-TIMEOUT.units']
|
||||
|
@ -1,10 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Unit with BindsTo=
|
||||
BindsTo=testsuite-23-bound-by.service
|
||||
After=testsuite-23-bound-by.service
|
||||
BindsTo=TEST-23-UNIT-FILE-bound-by.service
|
||||
After=TEST-23-UNIT-FILE-bound-by.service
|
||||
|
||||
[Service]
|
||||
ExecStart=sleep infinity
|
||||
# --kill-who= (no 'm') to check that the short form is accepted
|
||||
ExecStopPost=systemctl kill --kill-whom=main -sRTMIN+1 testsuite-23.service
|
||||
ExecStopPost=systemctl kill --kill-whom=main -sRTMIN+1 TEST-23-UNIT-FILE.service
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Failing unit
|
||||
OnFailure=testsuite-23-uphold.service
|
||||
OnFailure=TEST-23-UNIT-FILE-uphold.service
|
||||
|
||||
[Service]
|
||||
ExecStart=false
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-1.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-1.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-1.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-1.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-5.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-5.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-8.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-8.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-8.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-8.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
JoinsNamespaceOf=testsuite-23-joins-namespace-of-8.service
|
||||
JoinsNamespaceOf=TEST-23-UNIT-FILE-joins-namespace-of-8.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -7,7 +7,7 @@ Type=notify
|
||||
RemainAfterExit=yes
|
||||
MountAPIVFS=yes
|
||||
PrivateTmp=yes
|
||||
BindPaths=/run/testsuite-23-marker-fixed:/tmp/testfile-marker-fixed
|
||||
BindPaths=/run/TEST-23-UNIT-FILE-marker-fixed:/tmp/testfile-marker-fixed
|
||||
InaccessiblePaths=/run/inaccessible
|
||||
ExecStartPre=grep -q -F MARKER_FIXED /tmp/testfile-marker-fixed
|
||||
ExecStart=sh -c 'systemd-notify --ready; until grep -q -F MARKER_RUNTIME /tmp/testfile-marker-runtime; do sleep 0.1; done; test ! -f /run/inaccessible/testfile-marker-fixed'
|
@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Stop Propagation Receiver
|
||||
Wants=TEST-23-UNIT-FILE-prop-stop-two.service
|
||||
After=TEST-23-UNIT-FILE-prop-stop-two.service
|
||||
StopPropagatedFrom=TEST-23-UNIT-FILE-prop-stop-two.service
|
||||
|
||||
[Service]
|
||||
ExecStart=sleep infinity
|
||||
ExecStopPost=systemctl kill --kill-whom=main -sUSR2 TEST-23-UNIT-FILE.service
|
@ -5,5 +5,5 @@ Description=Failed Dependency Unit
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=sh -c "if [ -f /tmp/testsuite-23-retry-fail ]; then exit 0; else exit 1; fi"
|
||||
ExecStart=sh -c "if [ -f /tmp/TEST-23-UNIT-FILE-retry-fail ]; then exit 0; else exit 1; fi"
|
||||
Restart=no
|
@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Upheld Unit
|
||||
Requires=testsuite-23-retry-fail.service
|
||||
After=testsuite-23-retry-fail.service
|
||||
Requires=TEST-23-UNIT-FILE-retry-fail.service
|
||||
After=TEST-23-UNIT-FILE-retry-fail.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Upholding Unit
|
||||
Upholds=testsuite-23-retry-upheld.service
|
||||
Upholds=TEST-23-UNIT-FILE-retry-upheld.service
|
||||
|
||||
[Service]
|
||||
ExecStart=sleep infinity
|
@ -8,4 +8,4 @@ StartLimitBurst=15
|
||||
StartLimitIntervalSec=1h
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-23-short-lived.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE-short-lived.sh
|
@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Wants with percent-j specifier
|
||||
Wants=testsuite-23-specifier-j-depends-%j.service
|
||||
After=testsuite-23-specifier-j-depends-%j.service
|
||||
Wants=TEST-23-UNIT-FILE-specifier-j-depends-%j.service
|
||||
After=TEST-23-UNIT-FILE-specifier-j-depends-%j.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Succeeding unit
|
||||
OnSuccess=testsuite-23-fail.service
|
||||
OnSuccess=TEST-23-UNIT-FILE-fail.service
|
||||
|
||||
[Service]
|
||||
ExecStart=true
|
@ -6,4 +6,4 @@ Description=Unit that sets UpheldBy= through [Install]
|
||||
ExecStart=sleep infinity
|
||||
|
||||
[Install]
|
||||
UpheldBy=testsuite-23-retry-uphold.service
|
||||
UpheldBy=TEST-23-UNIT-FILE-retry-uphold.service
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Upholding Unit
|
||||
Upholds=testsuite-23-short-lived.service
|
||||
Upholds=TEST-23-UNIT-FILE-short-lived.service
|
||||
|
||||
[Service]
|
||||
ExecStart=sleep infinity
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-23-UNIT-FILE.units']
|
||||
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-30-ONCLOCKCHANGE.units']
|
||||
|
@ -4,7 +4,7 @@ Description=Honor First Shutdown feature
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/testsuite-52.units/%N.sh
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/TEST-52-HONORFIRSTSHUTDOWN.units/%N.sh
|
||||
ExecStop=sh -c 'kill -KILL $MAINPID'
|
||||
FailureAction=reboot
|
||||
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-52-HONORFIRSTSHUTDOWN.units']
|
||||
|
@ -5,3 +5,5 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
},
|
||||
]
|
||||
|
||||
testdata_subdirs += [meson.current_source_dir() / 'TEST-63-PATH.units']
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user