]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-32-OOMPOLICY/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-32-OOMPOLICY / test.sh
CommitLineData
36869f33 1#!/bin/bash
36869f33
LP
2set -e
3TEST_DESCRIPTION="test OOM killer logic"
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
7
8UNIFIED_CGROUP_HIERARCHY=yes
9
10test_setup() {
ec4cab49 11 create_empty_image_rootdir
36869f33
LP
12
13 (
14 LOG_LEVEL=5
15 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
16
17 setup_basic_environment
51fa8591 18 mask_supporting_services
36869f33
LP
19
20 # setup the testsuite service
21 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
22[Unit]
23Description=Testsuite service
24
25[Service]
26ExecStart=/testsuite.sh
27Type=oneshot
36869f33
LP
28MemoryAccounting=yes
29EOF
30 cp testsuite.sh $initdir/
31
32 setup_testsuite
cc469c3d 33 )
36869f33
LP
34}
35
36do_test "$@"