]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-07-ISSUE-1981/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-07-ISSUE-1981 / test.sh
CommitLineData
09f6f45a 1#!/bin/bash
818567fc 2set -e
09f6f45a 3TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/1981"
054ee249 4TEST_NO_QEMU=1
09f6f45a
EV
5
6. $TEST_BASE_DIR/test-functions
7
7cad32bb
MP
8NSPAWN_TIMEOUT=30s
9
09f6f45a 10test_setup() {
ec4cab49 11 create_empty_image_rootdir
09f6f45a
EV
12
13 # Create what will eventually be our root filesystem onto an overlay
14 (
15 LOG_LEVEL=5
16 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
17
18 setup_basic_environment
51fa8591 19 mask_supporting_services
056ae881 20
09f6f45a
EV
21 # setup the testsuite service
22 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
23[Unit]
24Description=Testsuite service
09f6f45a
EV
25
26[Service]
27ExecStart=/test-segfault.sh
28Type=oneshot
29EOF
30
31 cp test-segfault.sh $initdir/
32
33 setup_testsuite
cc469c3d 34 )
09f6f45a 35 setup_nspawn_root
09f6f45a
EV
36}
37
09f6f45a 38do_test "$@"