]> git.ipfire.org Git - thirdparty/systemd.git/blob - 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
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/1981"
4 TEST_NO_QEMU=1
5
6 . $TEST_BASE_DIR/test-functions
7
8 NSPAWN_TIMEOUT=30s
9
10 test_setup() {
11 create_empty_image_rootdir
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
19 mask_supporting_services
20
21 # setup the testsuite service
22 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
23 [Unit]
24 Description=Testsuite service
25
26 [Service]
27 ExecStart=/test-segfault.sh
28 Type=oneshot
29 EOF
30
31 cp test-segfault.sh $initdir/
32
33 setup_testsuite
34 )
35 setup_nspawn_root
36 }
37
38 do_test "$@"