1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

41 lines
785 B
Bash
Raw Normal View History

2015-11-28 16:47:56 +00:00
#!/bin/bash
set -e
2015-11-28 16:47:56 +00:00
TEST_DESCRIPTION="Resource limits-related tests"
. $TEST_BASE_DIR/test-functions
test_setup() {
create_empty_image_rootdir
2015-11-28 16:47:56 +00:00
# Create what will eventually be our root filesystem onto an overlay
(
LOG_LEVEL=5
eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
setup_basic_environment
mask_supporting_services
2015-11-28 16:47:56 +00:00
cat >$initdir/etc/systemd/system.conf <<EOF
[Manager]
DefaultLimitNOFILE=10000:16384
EOF
# setup the testsuite service
cat >$initdir/etc/systemd/system/testsuite.service <<EOF
[Unit]
Description=Testsuite service
[Service]
ExecStart=/test-rlimits.sh
Type=oneshot
EOF
cp test-rlimits.sh $initdir/
setup_testsuite
)
2015-11-28 16:47:56 +00:00
setup_nspawn_root
}
do_test "$@"