]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-09-ISSUE-2691/test.sh
test: add function to reduce copied setup boilerplate
[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 9test_setup() {
ec4cab49 10 create_empty_image_rootdir
4f4d6ee4
EV
11
12 # Create what will eventually be our root filesystem onto an overlay
13 (
14 LOG_LEVEL=5
15 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
16
17 setup_basic_environment
51fa8591 18 mask_supporting_services
4f4d6ee4
EV
19
20 # setup the testsuite service
21 cat >$initdir/etc/systemd/system/testsuite.service <<'EOF'
22[Unit]
23Description=Testsuite service
4f4d6ee4
EV
24
25[Service]
26Type=oneshot
27ExecStart=/bin/sh -c '>/testok'
28RemainAfterExit=yes
29ExecStop=/bin/sh -c 'kill -SEGV $$$$'
48c20af3 30TimeoutStopSec=270s
4f4d6ee4
EV
31EOF
32
33 setup_testsuite
cc469c3d 34 )
4f4d6ee4
EV
35}
36
4f4d6ee4 37do_test "$@"