summaryrefslogtreecommitdiffstats
path: root/test/units
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-13 12:34:41 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-28 11:51:27 +0100
commit4962ed9f33af3c12ea2dfb72bdf28ef619c52036 (patch)
treeb546589f277841890dc96df15e94d6672503e2df /test/units
parenttest: mount root rw and drop /etc/fstab (diff)
downloadsystemd-4962ed9f33af3c12ea2dfb72bdf28ef619c52036.tar.xz
systemd-4962ed9f33af3c12ea2dfb72bdf28ef619c52036.zip
test: make sure to reset state before starting integration tests
Diffstat (limited to 'test/units')
-rw-r--r--test/units/testsuite-01.service1
-rw-r--r--test/units/testsuite-02.service1
-rw-r--r--test/units/testsuite-03.service1
-rw-r--r--test/units/testsuite-04.service1
-rw-r--r--test/units/testsuite-05.service1
-rw-r--r--test/units/testsuite-06.service1
-rw-r--r--test/units/testsuite-07.service1
-rw-r--r--test/units/testsuite-08.service1
-rw-r--r--test/units/testsuite-09.service1
-rw-r--r--test/units/testsuite-10.service1
-rw-r--r--test/units/testsuite-11.service1
-rw-r--r--test/units/testsuite-12.service1
-rw-r--r--test/units/testsuite-13.service1
-rw-r--r--test/units/testsuite-14.service1
-rw-r--r--test/units/testsuite-15.service1
-rw-r--r--test/units/testsuite-16.service1
-rw-r--r--test/units/testsuite-17.service1
-rw-r--r--test/units/testsuite-18.service1
-rw-r--r--test/units/testsuite-19.service1
-rw-r--r--test/units/testsuite-20.service1
-rw-r--r--test/units/testsuite-22.service1
-rw-r--r--test/units/testsuite-23.service1
-rw-r--r--test/units/testsuite-24.service1
-rwxr-xr-xtest/units/testsuite-24.sh3
-rw-r--r--test/units/testsuite-25.service1
-rw-r--r--test/units/testsuite-26.service1
-rw-r--r--test/units/testsuite-27.service1
-rw-r--r--test/units/testsuite-28.service1
-rw-r--r--test/units/testsuite-29.service1
-rw-r--r--test/units/testsuite-30.service1
-rw-r--r--test/units/testsuite-31.service1
-rw-r--r--test/units/testsuite-32.service1
-rw-r--r--test/units/testsuite-33.service1
-rw-r--r--test/units/testsuite-34.service1
-rw-r--r--test/units/testsuite-36.service1
-rw-r--r--test/units/testsuite-37.service1
-rw-r--r--test/units/testsuite-39.service1
-rw-r--r--test/units/testsuite-40.service1
-rw-r--r--test/units/testsuite-41.service1
-rw-r--r--test/units/testsuite-42.service1
-rw-r--r--test/units/testsuite-43.service1
-rw-r--r--test/units/testsuite-44.service1
-rw-r--r--test/units/testsuite-46.service1
-rw-r--r--test/units/testsuite-47.service1
44 files changed, 46 insertions, 0 deletions
diff --git a/test/units/testsuite-01.service b/test/units/testsuite-01.service
index 8112a85c18..85b9cf5a96 100644
--- a/test/units/testsuite-01.service
+++ b/test/units/testsuite-01.service
@@ -3,5 +3,6 @@ Description=TEST-01-BASIC
After=multi-user.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=sh -e -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; systemctl daemon-reload ; echo OK >/testok'
Type=oneshot
diff --git a/test/units/testsuite-02.service b/test/units/testsuite-02.service
index ddb4729322..701610b790 100644
--- a/test/units/testsuite-02.service
+++ b/test/units/testsuite-02.service
@@ -3,5 +3,6 @@ Description=TEST-02-CRYPTSETUP
After=multi-user.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=sh -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK > /testok'
Type=oneshot
diff --git a/test/units/testsuite-03.service b/test/units/testsuite-03.service
index f487d41f82..fe18fdc7d7 100644
--- a/test/units/testsuite-03.service
+++ b/test/units/testsuite-03.service
@@ -3,5 +3,6 @@ Description=TEST-03-JOBS
After=multi-user.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-04.service b/test/units/testsuite-04.service
index 468acfa43e..3d2b4a8bc2 100644
--- a/test/units/testsuite-04.service
+++ b/test/units/testsuite-04.service
@@ -2,5 +2,6 @@
Description=TEST-04-JOURNAL
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-05.service b/test/units/testsuite-05.service
index 44108d7701..66356fd16f 100644
--- a/test/units/testsuite-05.service
+++ b/test/units/testsuite-05.service
@@ -2,5 +2,6 @@
Description=TEST-05-RLIMITS
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-06.service b/test/units/testsuite-06.service
index 72c0a2ca0d..3f8dad36dc 100644
--- a/test/units/testsuite-06.service
+++ b/test/units/testsuite-06.service
@@ -5,5 +5,6 @@ Requires=load-systemd-test-module.service
After=load-systemd-test-module.service
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-07.service b/test/units/testsuite-07.service
index 5521632a06..2506c211c2 100644
--- a/test/units/testsuite-07.service
+++ b/test/units/testsuite-07.service
@@ -2,5 +2,6 @@
Description=TEST-07-ISSUE-1981
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-08.service b/test/units/testsuite-08.service
index 79fb089c70..d961dc7ae2 100644
--- a/test/units/testsuite-08.service
+++ b/test/units/testsuite-08.service
@@ -2,5 +2,6 @@
Description=TEST-08-ISSUE-2730
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=sh -x -c 'mount -o remount,rw /dev/sda1 && echo OK >/testok; systemctl poweroff'
Type=oneshot
diff --git a/test/units/testsuite-09.service b/test/units/testsuite-09.service
index d551501335..fc59e80889 100644
--- a/test/units/testsuite-09.service
+++ b/test/units/testsuite-09.service
@@ -2,6 +2,7 @@
Description=TEST-09-ISSUE-2691
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=sh -c '>/testok'
ExecStop=sh -c 'kill -SEGV $$$$'
Type=oneshot
diff --git a/test/units/testsuite-10.service b/test/units/testsuite-10.service
index 13756cfa51..24f0da35ab 100644
--- a/test/units/testsuite-10.service
+++ b/test/units/testsuite-10.service
@@ -2,5 +2,6 @@
Description=TEST-10-ISSUE-2467
[Service]
+ExecStartPre=rm -f /failed /testok
Type=oneshot
ExecStart=sh -e -x -c 'rm -f /tmp/nonexistent; systemctl start test10.socket; printf x >test.file; socat -t20 OPEN:test.file UNIX-CONNECT:/run/test.ctl; >/testok'
diff --git a/test/units/testsuite-11.service b/test/units/testsuite-11.service
index 9093ae8d43..1544fd6819 100644
--- a/test/units/testsuite-11.service
+++ b/test/units/testsuite-11.service
@@ -2,5 +2,6 @@
Description=TEST-11-ISSUE-3166
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-12.service b/test/units/testsuite-12.service
index 77153ea2eb..72894eff92 100644
--- a/test/units/testsuite-12.service
+++ b/test/units/testsuite-12.service
@@ -3,5 +3,6 @@ Description=TEST-12-ISSUE-3171
After=multi-user.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-13.service b/test/units/testsuite-13.service
index a7441d1279..5086793a90 100644
--- a/test/units/testsuite-13.service
+++ b/test/units/testsuite-13.service
@@ -2,5 +2,6 @@
Description=TEST-13-NSPAWN-SMOKE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-14.service b/test/units/testsuite-14.service
index 1fc0da6409..1606c68fb1 100644
--- a/test/units/testsuite-14.service
+++ b/test/units/testsuite-14.service
@@ -2,6 +2,7 @@
Description=TEST-14-MACHINE-ID
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
ExecStart=/bin/sh -e -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK >/testok'
Type=oneshot
diff --git a/test/units/testsuite-15.service b/test/units/testsuite-15.service
index 2d07bd6943..09571ed1ab 100644
--- a/test/units/testsuite-15.service
+++ b/test/units/testsuite-15.service
@@ -2,5 +2,6 @@
Description=TEST-15-DROPIN
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-16.service b/test/units/testsuite-16.service
index 1ebf3d3af6..b44baad91a 100644
--- a/test/units/testsuite-16.service
+++ b/test/units/testsuite-16.service
@@ -12,6 +12,7 @@ Wants=fail-runtime.service
StopWhenUnneeded=yes
[Service]
+ExecStartPre=rm -f /failed /testok
Type=simple
TimeoutStartSec=infinity
ExecStartPre=/usr/lib/systemd/tests/testdata/units/%N.sh
diff --git a/test/units/testsuite-17.service b/test/units/testsuite-17.service
index 2002543a33..ed2017a848 100644
--- a/test/units/testsuite-17.service
+++ b/test/units/testsuite-17.service
@@ -2,5 +2,6 @@
Description=TEST-17-UDEV-WANTS
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-18.service b/test/units/testsuite-18.service
index 08e836671e..e4a945dc3e 100644
--- a/test/units/testsuite-18.service
+++ b/test/units/testsuite-18.service
@@ -2,5 +2,6 @@
Description=TEST-18-FAILUREACTION
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-19.service b/test/units/testsuite-19.service
index 13a0b612cb..d6ad5beded 100644
--- a/test/units/testsuite-19.service
+++ b/test/units/testsuite-19.service
@@ -2,5 +2,6 @@
Description=TEST-19-DELEGATE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-20.service b/test/units/testsuite-20.service
index 9befd81283..d31d531175 100644
--- a/test/units/testsuite-20.service
+++ b/test/units/testsuite-20.service
@@ -4,6 +4,7 @@ Before=getty-pre.target
Wants=getty-pre.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
NotifyAccess=all
diff --git a/test/units/testsuite-22.service b/test/units/testsuite-22.service
index 3d53cbf56c..55e3056d53 100644
--- a/test/units/testsuite-22.service
+++ b/test/units/testsuite-22.service
@@ -5,6 +5,7 @@ Before=getty-pre.target
Wants=getty-pre.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
StandardOutput=tty
diff --git a/test/units/testsuite-23.service b/test/units/testsuite-23.service
index c221bd28cc..b3b3297af8 100644
--- a/test/units/testsuite-23.service
+++ b/test/units/testsuite-23.service
@@ -2,5 +2,6 @@
Description=TEST-23-TYPE-EXEC
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-24.service b/test/units/testsuite-24.service
index de53f03fb4..43d4816d48 100644
--- a/test/units/testsuite-24.service
+++ b/test/units/testsuite-24.service
@@ -2,5 +2,6 @@
Description=TEST-24-UNIT-TESTS
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-24.sh b/test/units/testsuite-24.sh
index 0e3cb15477..1ff1c3347b 100755
--- a/test/units/testsuite-24.sh
+++ b/test/units/testsuite-24.sh
@@ -6,6 +6,9 @@ NPROC=$(nproc)
MAX_QUEUE_SIZE=${NPROC:-2}
IFS=$'\n' TEST_LIST=($(ls /usr/lib/systemd/tests/test-*))
+# reset state
+rm /failed-tests /skipped-tests /skipped
+
# Check & report test results
# Arguments:
# $1: test path
diff --git a/test/units/testsuite-25.service b/test/units/testsuite-25.service
index 39b43917d0..45d8b6945f 100644
--- a/test/units/testsuite-25.service
+++ b/test/units/testsuite-25.service
@@ -2,5 +2,6 @@
Description=TEST-25-IMPORT
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-26.service b/test/units/testsuite-26.service
index ac1b2faa3f..65b66835ed 100644
--- a/test/units/testsuite-26.service
+++ b/test/units/testsuite-26.service
@@ -2,5 +2,6 @@
Description=TEST-26-SETENV
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-27.service b/test/units/testsuite-27.service
index a1e8851088..52185f0572 100644
--- a/test/units/testsuite-27.service
+++ b/test/units/testsuite-27.service
@@ -2,5 +2,6 @@
Description=TEST-27-STDOUTFILE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-28.service b/test/units/testsuite-28.service
index c4be0c631c..6a41114493 100644
--- a/test/units/testsuite-28.service
+++ b/test/units/testsuite-28.service
@@ -5,5 +5,6 @@ Wants=specifier-j-wants.service
After=specifier-j-wants.service
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=true
Type=oneshot
diff --git a/test/units/testsuite-29.service b/test/units/testsuite-29.service
index 87e46bd587..90c2187bd7 100644
--- a/test/units/testsuite-29.service
+++ b/test/units/testsuite-29.service
@@ -2,5 +2,6 @@
Description=TEST-29-UDEV-ID_RENAMING
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-30.service b/test/units/testsuite-30.service
index c3bb25853d..eb342f3d17 100644
--- a/test/units/testsuite-30.service
+++ b/test/units/testsuite-30.service
@@ -2,5 +2,6 @@
Description=TEST-30-ONCLOCKCHANGE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-31.service b/test/units/testsuite-31.service
index 26ec2cb5cd..07dfb0bb54 100644
--- a/test/units/testsuite-31.service
+++ b/test/units/testsuite-31.service
@@ -2,5 +2,6 @@
Description=TEST-31-DEVICE-ENUMERATION
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-32.service b/test/units/testsuite-32.service
index a868b46abf..aab95cb741 100644
--- a/test/units/testsuite-32.service
+++ b/test/units/testsuite-32.service
@@ -2,6 +2,7 @@
Description=TEST-32-OOMPOLICY
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
MemoryAccounting=yes
diff --git a/test/units/testsuite-33.service b/test/units/testsuite-33.service
index 8b65c8b106..b64f1e0b79 100644
--- a/test/units/testsuite-33.service
+++ b/test/units/testsuite-33.service
@@ -2,5 +2,6 @@
Description=TEST-33-CLEAN-UNIT
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-34.service b/test/units/testsuite-34.service
index d7051d450c..361e328221 100644
--- a/test/units/testsuite-34.service
+++ b/test/units/testsuite-34.service
@@ -2,5 +2,6 @@
Description=TEST-34-DYNAMICUSERMIGRATE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-36.service b/test/units/testsuite-36.service
index f2dcbead69..a681153ee4 100644
--- a/test/units/testsuite-36.service
+++ b/test/units/testsuite-36.service
@@ -2,5 +2,6 @@
Description=TEST-36-NUMAPOLICY
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-37.service b/test/units/testsuite-37.service
index 68c805985d..d25c6d2cf9 100644
--- a/test/units/testsuite-37.service
+++ b/test/units/testsuite-37.service
@@ -2,5 +2,6 @@
Description=TEST-37-RUNTIMEDIRECTORYPRESERVE
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-39.service b/test/units/testsuite-39.service
index dbd924c6aa..395fe803e7 100644
--- a/test/units/testsuite-39.service
+++ b/test/units/testsuite-39.service
@@ -2,5 +2,6 @@
Description=TEST-39-EXECRELOAD
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-40.service b/test/units/testsuite-40.service
index 51659cce5d..38b0bd80d1 100644
--- a/test/units/testsuite-40.service
+++ b/test/units/testsuite-40.service
@@ -2,5 +2,6 @@
Description=TEST-40-EXEC-COMMAND-EX
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-41.service b/test/units/testsuite-41.service
index bf0b0db6a2..766cb4c99a 100644
--- a/test/units/testsuite-41.service
+++ b/test/units/testsuite-41.service
@@ -2,5 +2,6 @@
Description=TEST-41-ONESHOT-RESTART
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-42.service b/test/units/testsuite-42.service
index d5d102fd91..a5504b515d 100644
--- a/test/units/testsuite-42.service
+++ b/test/units/testsuite-42.service
@@ -4,5 +4,6 @@ Before=getty-pre.target
Wants=getty-pre.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-43.service b/test/units/testsuite-43.service
index 6badedcc71..31248f17e8 100644
--- a/test/units/testsuite-43.service
+++ b/test/units/testsuite-43.service
@@ -4,5 +4,6 @@ After=systemd-logind.service user@4711.service
Wants=user@4711.service
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
diff --git a/test/units/testsuite-44.service b/test/units/testsuite-44.service
index 1211ea3eab..bd4dd728aa 100644
--- a/test/units/testsuite-44.service
+++ b/test/units/testsuite-44.service
@@ -6,6 +6,7 @@ Wants=systemd-journald@foobar.socket systemd-journald-varlink@foobar.socket
After=systemd-journald@foobar.socket systemd-journald-varlink@foobar.socket
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
LogTarget=foobar
diff --git a/test/units/testsuite-46.service b/test/units/testsuite-46.service
index 46e9a618e2..da359cbb23 100644
--- a/test/units/testsuite-46.service
+++ b/test/units/testsuite-46.service
@@ -4,6 +4,7 @@ Before=getty-pre.target
Wants=getty-pre.target
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
NotifyAccess=all
diff --git a/test/units/testsuite-47.service b/test/units/testsuite-47.service
index b6015e27cc..3816c57eed 100644
--- a/test/units/testsuite-47.service
+++ b/test/units/testsuite-47.service
@@ -2,5 +2,6 @@
Description=TEST-47-ISSUE-14566
[Service]
+ExecStartPre=rm -f /failed /testok
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot