]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-09-ISSUE-2691/test.sh
test: Increase qemu timeout from 90s to 180s
[thirdparty/systemd.git] / test / TEST-09-ISSUE-2691 / 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="https://github.com/systemd/systemd/issues/2691"
6 TEST_NO_NSPAWN=1
7
8 . $TEST_BASE_DIR/test-functions
9 QEMU_TIMEOUT=180
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 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 After=multi-user.target
28
29 [Service]
30 Type=oneshot
31 ExecStart=/bin/sh -c '>/testok'
32 RemainAfterExit=yes
33 ExecStop=/bin/sh -c 'kill -SEGV $$$$'
34 TimeoutStopSec=270s
35 EOF
36
37 setup_testsuite
38 ) || return 1
39
40 # mask some services that we do not want to run in these tests
41 ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
42 ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
43 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
44 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
45 ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
46
47 ddebug "umount $TESTDIR/root"
48 umount $TESTDIR/root
49 }
50
51 do_test "$@"