]>
Commit | Line | Data |
---|---|---|
68a8f177 | 1 | #!/bin/bash |
818567fc | 2 | set -e |
68a8f177 EV |
3 | TEST_DESCRIPTION="Resource limits-related tests" |
4 | ||
5 | . $TEST_BASE_DIR/test-functions | |
6 | ||
68a8f177 | 7 | test_setup() { |
ec4cab49 | 8 | create_empty_image_rootdir |
68a8f177 EV |
9 | |
10 | # Create what will eventually be our root filesystem onto an overlay | |
11 | ( | |
12 | LOG_LEVEL=5 | |
13 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) | |
14 | ||
15 | setup_basic_environment | |
51fa8591 | 16 | mask_supporting_services |
056ae881 | 17 | |
68a8f177 EV |
18 | cat >$initdir/etc/systemd/system.conf <<EOF |
19 | [Manager] | |
20 | DefaultLimitNOFILE=10000:16384 | |
21 | EOF | |
22 | ||
23 | # setup the testsuite service | |
24 | cat >$initdir/etc/systemd/system/testsuite.service <<EOF | |
25 | [Unit] | |
26 | Description=Testsuite service | |
68a8f177 EV |
27 | |
28 | [Service] | |
29 | ExecStart=/test-rlimits.sh | |
30 | Type=oneshot | |
31 | EOF | |
32 | ||
33 | cp test-rlimits.sh $initdir/ | |
34 | ||
35 | setup_testsuite | |
cc469c3d | 36 | ) |
68a8f177 | 37 | setup_nspawn_root |
68a8f177 EV |
38 | } |
39 | ||
68a8f177 | 40 | do_test "$@" |