]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-17-UDEV-WANTS/test.sh
36032348b89204124e5105bd5493c1e18918cbbe
[thirdparty/systemd.git] / test / TEST-17-UDEV-WANTS / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
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 EOF
34 cp testsuite.sh $initdir/
35
36 setup_testsuite
37 )
38 }
39
40 do_test "$@"