]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/units/testsuite-05.sh
scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgrou...
[thirdparty/systemd.git] / test / units / testsuite-05.sh
CommitLineData
ed024e1d
ZJS
1#!/usr/bin/env bash
2set -x
3set -e
4set -o pipefail
5
6P=/run/systemd/system.conf.d
7mkdir $P
8
9cat >$P/rlimits.conf <<EOF
10[Manager]
11DefaultLimitNOFILE=10000:16384
12EOF
13
14systemctl daemon-reload
15
5522e628
ZJS
16[[ "$(systemctl show -P DefaultLimitNOFILESoft)" = "10000" ]]
17[[ "$(systemctl show -P DefaultLimitNOFILE)" = "16384" ]]
ed024e1d 18
5522e628
ZJS
19[[ "$(systemctl show -P LimitNOFILESoft testsuite-05.service)" = "10000" ]]
20[[ "$(systemctl show -P LimitNOFILE testsuite-05.service)" = "16384" ]]
ed024e1d
ZJS
21
22systemd-run --wait -t bash -c '[[ "$(ulimit -n -S)" = "10000" ]]'
23systemd-run --wait -t bash -c '[[ "$(ulimit -n -H)" = "16384" ]]'
24
25touch /testok