summaryrefslogtreecommitdiff
path: root/test/TEST-05-RLIMITS/test-rlimits.sh
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2015-11-28 16:47:56 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2015-11-28 16:47:56 +0000
commit68a8f17775aef3303848b1ab5c5eff45945285c5 (patch)
tree6dc52fadd668b3ab38051eb14c51633e22301cff /test/TEST-05-RLIMITS/test-rlimits.sh
parent564c44436cf64adc7a9eff8c17f386899194a893 (diff)
tests: add basic rlimits test
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