2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 TEST_DESCRIPTION
="Resource limits-related tests"
7 .
$TEST_BASE_DIR/test-functions
11 mkdir
-p $TESTDIR/root
12 mount
${LOOPDEV}p1
$TESTDIR/root
14 # Create what will eventually be our root filesystem onto an overlay
17 eval $
(udevadm info
--export --query=env
--name=${LOOPDEV}p2
)
19 setup_basic_environment
21 # mask some services that we do not want to run in these tests
22 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-hwdb-update.service
23 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-journal-catalog-update.service
24 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-networkd.service
25 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-networkd.socket
26 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-resolved.service
27 ln -fs /dev
/null
$initdir/etc
/systemd
/system
/systemd-machined.service
29 cat >$initdir/etc
/systemd
/system.conf
<<EOF
31 DefaultLimitNOFILE=10000:16384
34 # setup the testsuite service
35 cat >$initdir/etc
/systemd
/system
/testsuite.service
<<EOF
37 Description=Testsuite service
40 ExecStart=/test-rlimits.sh
44 cp test-rlimits.sh
$initdir/
50 ddebug
"umount $TESTDIR/root"