summaryrefslogtreecommitdiff
path: root/test/TEST-05-RLIMITS/test-rlimits.sh
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-12-10 11:20:03 +0100
committerLennart Poettering <lennart@poettering.net>2015-12-10 11:20:03 +0100
commite4b0e862252ac5c50c533b46dfe839b7c45639ac (patch)
tree023a5eff1cf2b0cda4c9b4d6b7b4e01e920b7913 /test/TEST-05-RLIMITS/test-rlimits.sh
parent59c74f21751c5af2e6e5118a8d09c16e0e1efa0f (diff)
parent3c11da9d80e804801575a0a9f6db116e12fdd01d (diff)
Merge pull request #2056 from evverx/expose-soft-limits-on-the-bus
Expose soft limits on the bus
Diffstat (limited to 'test/TEST-05-RLIMITS/test-rlimits.sh')
-rwxr-xr-xtest/TEST-05-RLIMITS/test-rlimits.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/TEST-05-RLIMITS/test-rlimits.sh b/test/TEST-05-RLIMITS/test-rlimits.sh
new file mode 100755
index 0000000000..54000ecefb
--- /dev/null
+++ b/test/TEST-05-RLIMITS/test-rlimits.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -x
+set -e
+set -o pipefail
+
+[[ "$(systemctl show -p DefaultLimitNOFILESoft)" = "DefaultLimitNOFILESoft=10000" ]]
+[[ "$(systemctl show -p DefaultLimitNOFILE)" = "DefaultLimitNOFILE=16384" ]]
+
+[[ "$(systemctl show -p LimitNOFILESoft testsuite.service)" = "LimitNOFILESoft=10000" ]]
+[[ "$(systemctl show -p LimitNOFILE testsuite.service)" = "LimitNOFILE=16384" ]]
+
+[[ "$(ulimit -n -S)" = "10000" ]]
+[[ "$(ulimit -n -H)" = "16384" ]]
+
+touch /testok
+exit 0