]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-19-DELEGATE/test.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / test / TEST-19-DELEGATE / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="test cgroup delegation in the unified hierarchy"
4 TEST_NO_NSPAWN=1
5
6 . $TEST_BASE_DIR/test-functions
7 QEMU_TIMEOUT=180
8 UNIFIED_CGROUP_HIERARCHY=yes
9
10 test_setup() {
11 create_empty_image
12 mkdir -p $TESTDIR/root
13 mount ${LOOPDEV}p1 $TESTDIR/root
14
15 (
16 LOG_LEVEL=5
17 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
18
19 setup_basic_environment
20
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
28
29 # setup the testsuite service
30 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
31 [Unit]
32 Description=Testsuite service
33
34 [Service]
35 ExecStart=/bin/bash -x /testsuite.sh
36 Type=oneshot
37 StandardOutput=tty
38 StandardError=tty
39 EOF
40 cp testsuite.sh $initdir/
41
42 setup_testsuite
43 ) || return 1
44
45 ddebug "umount $TESTDIR/root"
46 umount $TESTDIR/root
47 }
48
49 do_test "$@"