From ed024e1d98af8c0b06fdfb0f9f96169f2808baac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 10 Dec 2019 14:09:59 +0100 Subject: [PATCH] test: move TEST-05-RLIMITS setup to static files The test currently fails in the check for LimitNOFILESoft/LimitNOFILE. I see default values there. This doesn't seem to be related to the changes in the test suite, but rather to the recent changes to pid1. --- test/TEST-05-RLIMITS/test-rlimits.sh | 15 --------------- test/TEST-05-RLIMITS/test.sh | 21 +-------------------- test/units/testsuite-05.service | 6 ++++++ test/units/testsuite-05.sh | 25 +++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 35 deletions(-) delete mode 100755 test/TEST-05-RLIMITS/test-rlimits.sh create mode 100644 test/units/testsuite-05.service create mode 100755 test/units/testsuite-05.sh diff --git a/test/TEST-05-RLIMITS/test-rlimits.sh b/test/TEST-05-RLIMITS/test-rlimits.sh deleted file mode 100755 index 86b57601fe..0000000000 --- a/test/TEST-05-RLIMITS/test-rlimits.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env 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 diff --git a/test/TEST-05-RLIMITS/test.sh b/test/TEST-05-RLIMITS/test.sh index bda37ef212..6412188ef2 100755 --- a/test/TEST-05-RLIMITS/test.sh +++ b/test/TEST-05-RLIMITS/test.sh @@ -14,27 +14,8 @@ test_setup() { setup_basic_environment mask_supporting_services - - cat >$initdir/etc/systemd/system.conf <$initdir/etc/systemd/system/testsuite.service <$P/rlimits.conf <