]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-16-EXTEND-TIMEOUT/test.sh
namespace: implicitly adds DeviceAllow= when RootImage= is set
[thirdparty/systemd.git] / test / TEST-16-EXTEND-TIMEOUT / 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="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests"
6 SKIP_INITRD=yes
7 TEST_NO_QEMU=1
8
9 . $TEST_BASE_DIR/test-functions
10
11 test_setup() {
12 create_empty_image
13 mkdir -p $TESTDIR/root
14 mount ${LOOPDEV}p1 $TESTDIR/root
15
16 # Create what will eventually be our root filesystem onto an overlay
17 (
18 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
19
20 setup_basic_environment
21
22 for s in success-all success-start success-stop success-runtime \
23 fail-start fail-stop fail-runtime
24 do
25 cp testsuite-${s}.service ${initdir}/etc/systemd/system
26 done
27 cp testsuite.service ${initdir}/etc/systemd/system
28
29 cp extend_timeout_test_service.sh ${initdir}/
30 cp assess.sh ${initdir}/
31 cp $BUILD_DIR/systemd-notify ${initdir}/bin
32 cp $BUILD_DIR/src/shared/libsystemd-shared-*.so ${initdir}/usr/lib
33
34 setup_testsuite
35 ) || return 1
36 # mask some services that we do not want to run in these tests
37 ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
38 ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
39 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
40 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
41 ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
42
43 setup_nspawn_root
44
45 ddebug "umount $TESTDIR/root"
46 umount $TESTDIR/root
47 }
48
49 test_cleanup() {
50 return 0
51 }
52
53 do_test "$@"