]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-09-ISSUE-2691/test.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / test / TEST-09-ISSUE-2691 / test.sh
CommitLineData
4f4d6ee4 1#!/bin/bash
818567fc 2set -e
4f4d6ee4 3TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/2691"
054ee249 4TEST_NO_NSPAWN=1
4f4d6ee4
EV
5
6. $TEST_BASE_DIR/test-functions
48c20af3 7QEMU_TIMEOUT=180
4f4d6ee4 8
4f4d6ee4
EV
9test_setup() {
10 create_empty_image
11 mkdir -p $TESTDIR/root
12 mount ${LOOPDEV}p1 $TESTDIR/root
13
14 # Create what will eventually be our root filesystem onto an overlay
15 (
16 LOG_LEVEL=5
17 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
18
19 setup_basic_environment
20
21 # setup the testsuite service
22 cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
23[Unit]
24Description=Testsuite service
4f4d6ee4
EV
25
26[Service]
27Type=oneshot
28ExecStart=/bin/sh -c '>/testok'
29RemainAfterExit=yes
30ExecStop=/bin/sh -c 'kill -SEGV $$$$'
48c20af3 31TimeoutStopSec=270s
4f4d6ee4
EV
32EOF
33
34 setup_testsuite
35 ) || return 1
36
37 # mask some services that we do not want to run in these tests
38 ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
39 ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
40 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
41 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
42 ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
43
44 ddebug "umount $TESTDIR/root"
45 umount $TESTDIR/root
46}
47
4f4d6ee4 48do_test "$@"