Skip to content

Commit a3dc2bb

Browse files
blucayuwata
authored andcommitted
test: use /run/ for test configuration, not /etc/
In case of failures we don't want to leave an image with intermediate test configuration, as images are reused across multiple tests Follow-up for edca63a
1 parent 45f63c3 commit a3dc2bb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/units/TEST-07-PID1.concurrency.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,42 @@ set -o pipefail
99
# shellcheck source=test/units/util.sh
1010
. "$(dirname "$0")"/util.sh
1111

12-
cat >/etc/systemd/system/concurrency1.slice <<EOF
12+
cat >/run/systemd/system/concurrency1.slice <<EOF
1313
[Slice]
1414
ConcurrencyHardMax=4
1515
ConcurrencySoftMax=3
1616
EOF
1717

18-
cat >/etc/systemd/system/[email protected] <<EOF
18+
cat >/run/systemd/system/[email protected] <<EOF
1919
[Service]
2020
Slice=concurrency1.slice
2121
ExecStart=sleep infinity
2222
EOF
2323

24-
cat >/etc/systemd/system/[email protected] <<EOF
24+
cat >/run/systemd/system/[email protected] <<EOF
2525
[Unit]
2626
After=sleepforever1@%i.service
2727
2828
[Service]
2929
ExecStart=true
3030
EOF
3131

32-
cat >/etc/systemd/system/concurrency1-concurrency2.slice <<EOF
32+
cat >/run/systemd/system/concurrency1-concurrency2.slice <<EOF
3333
[Slice]
3434
ConcurrencySoftMax=1
3535
EOF
3636

37-
cat >/etc/systemd/system/[email protected] <<EOF
37+
cat >/run/systemd/system/[email protected] <<EOF
3838
[Service]
3939
Slice=concurrency1-concurrency2.slice
4040
ExecStart=sleep infinity
4141
EOF
42-
cat >/etc/systemd/system/concurrency1-concurrency3.slice <<EOF
42+
cat >/run/systemd/system/concurrency1-concurrency3.slice <<EOF
4343
[Slice]
4444
ConcurrencySoftMax=1
4545
EOF
4646

47-
cat >/etc/systemd/system/[email protected] <<EOF
47+
cat >/run/systemd/system/[email protected] <<EOF
4848
[Service]
4949
Slice=concurrency1-concurrency3.slice
5050
ExecStart=sleep infinity
@@ -117,12 +117,12 @@ systemctl start [email protected]
117117
systemctl stop concurrency1.slice
118118
systemctl reset-failed
119119

120-
rm /etc/systemd/system/concurrency1.slice
121-
rm /etc/systemd/system/concurrency1-concurrency2.slice
122-
rm /etc/systemd/system/concurrency1-concurrency3.slice
123-
rm /etc/systemd/system/[email protected]
124-
rm /etc/systemd/system/[email protected]
125-
rm /etc/systemd/system/[email protected]
126-
rm /etc/systemd/system/[email protected]
120+
rm /run/systemd/system/concurrency1.slice
121+
rm /run/systemd/system/concurrency1-concurrency2.slice
122+
rm /run/systemd/system/concurrency1-concurrency3.slice
123+
rm /run/systemd/system/[email protected]
124+
rm /run/systemd/system/[email protected]
125+
rm /run/systemd/system/[email protected]
126+
rm /run/systemd/system/[email protected]
127127

128128
systemctl daemon-reload

0 commit comments

Comments
 (0)