]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-31-DEVICE-ENUMERATION/test.sh
test: use "ln -fs"
[thirdparty/systemd.git] / test / TEST-31-DEVICE-ENUMERATION / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="plugged -> dead -> plugged issue #11997"
4 TEST_NO_NSPAWN=1
5
6 . $TEST_BASE_DIR/test-functions
7 QEMU_TIMEOUT=300
8
9 test_setup() {
10 create_empty_image_rootdir
11
12 (
13 LOG_LEVEL=5
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
16 setup_basic_environment
17
18 # mask some services that we do not want to run in these tests
19 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
20 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
21 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
22 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
23 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
24
25 # setup the testsuite service
26 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
27 [Unit]
28 Description=Testsuite service
29
30 [Service]
31 ExecStart=/bin/bash -x /testsuite.sh
32 Type=oneshot
33 StandardOutput=tty
34 StandardError=tty
35 EOF
36 cp testsuite.sh $initdir/
37
38 setup_testsuite
39 )
40 }
41
42 do_test "$@"