]> git.proxmox.com Git - systemd.git/blob - test/TEST-19-DELEGATE/test.sh
New upstream version 236
[systemd.git] / test / TEST-19-DELEGATE / test.sh
1 #!/bin/bash
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4 set -e
5 TEST_DESCRIPTION="test cgroup delegation in the unifier hierarchy"
6 TEST_NO_NSPAWN=1
7
8 . $TEST_BASE_DIR/test-functions
9 QEMU_TIMEOUT=180
10 UNIFIED_CGROUP_HIERARCHY=yes
11
12 test_setup() {
13 create_empty_image
14 mkdir -p $TESTDIR/root
15 mount ${LOOPDEV}p1 $TESTDIR/root
16
17 (
18 LOG_LEVEL=5
19 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
20
21 setup_basic_environment
22
23 # setup the testsuite service
24 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
25 [Unit]
26 Description=Testsuite service
27
28 [Service]
29 ExecStart=/bin/bash -x /testsuite.sh
30 Type=oneshot
31 StandardOutput=tty
32 StandardError=tty
33 EOF
34 cp testsuite.sh $initdir/
35
36 setup_testsuite
37 ) || return 1
38
39 ddebug "umount $TESTDIR/root"
40 umount $TESTDIR/root
41 }
42
43 do_test "$@"