Skip to content

Commit 0ffb690

Browse files
mrc0mmandbluca
authored andcommitted
test: make the test happy with coverage builds
Bump the LimitFSIZE=, since the process needs to write quite a lot of .gcda files, and suppress coverage errors with DynamicUser=true.
1 parent 0e5f89b commit 0ffb690

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/units/testsuite-07.exec-context.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ rm -rf /var/{cache,lib,log}/context /etc/{also_,}context
237237
ARGUMENTS=(
238238
-p LimitCPU=15
239239
-p LimitCPU=10:15 # ulimit -t
240-
-p LimitFSIZE=7K # ulimit -f
240+
-p LimitFSIZE=96G # ulimit -f
241241
-p LimitDATA=8T:infinity
242242
-p LimitDATA=infinity # ulimit -d
243243
-p LimitSTACK=8M # ulimit -s
@@ -267,7 +267,7 @@ ARGUMENTS=(
267267
systemd-run --wait --pipe "${ARGUMENTS[@]}" \
268268
bash -xec 'KB=1; MB=$((KB * 1024)); GB=$((MB * 1024)); TB=$((GB * 1024));
269269
: CPU; [[ $(ulimit -St) -eq 10 ]]; [[ $(ulimit -Ht) -eq 15 ]];
270-
: FSIZE; [[ $(ulimit -Sf) -eq $((7 * KB)) ]]; [[ $(ulimit -Hf) -eq $((7 * KB)) ]];
270+
: FSIZE; [[ $(ulimit -Sf) -eq $((96 * GB)) ]]; [[ $(ulimit -Hf) -eq $((96 * GB)) ]];
271271
: DATA; [[ $(ulimit -Sd) == unlimited ]]; [[ $(ulimit -Hd) == unlimited ]];
272272
: STACK; [[ $(ulimit -Ss) -eq $((8 * MB)) ]]; [[ $(ulimit -Hs) -eq $((8 * MB)) ]];
273273
: CORE; [[ $(ulimit -Sc) -eq $((17 * MB)) ]]; [[ $(ulimit -Hc) -eq $((17 * MB)) ]];
@@ -290,7 +290,7 @@ mkdir /tmp/root
290290
touch /tmp/root/foo
291291
chmod +x /tmp/root/foo
292292
(! systemd-run --wait --pipe false)
293-
(! systemd-run --wait --pipe -p DynamicUser=yes -p WorkingDirectory=/nonexistent true)
293+
(! systemd-run --wait --pipe --unit "test-dynamicuser-fail" -p DynamicUser=yes -p WorkingDirectory=/nonexistent true)
294294
(! systemd-run --wait --pipe -p RuntimeDirectory=not-a-directory true)
295295
(! systemd-run --wait --pipe -p RootDirectory=/tmp/root this-shouldnt-exist)
296296
(! systemd-run --wait --pipe -p RootDirectory=/tmp/root /foo)

0 commit comments

Comments
 (0)