]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-17-UDEV-WANTS/test.sh
network: make all failures in route configuration fatal
[thirdparty/systemd.git] / test / TEST-17-UDEV-WANTS / test.sh
CommitLineData
3ac62a0e 1#!/bin/bash
3ac62a0e
LP
2set -e
3TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
f775f613 7QEMU_TIMEOUT=300
3ac62a0e
LP
8
9test_setup() {
10 create_empty_image
11 mkdir -p $TESTDIR/root
12 mount ${LOOPDEV}p1 $TESTDIR/root
13
14 (
15 LOG_LEVEL=5
16 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
17
18 setup_basic_environment
19
20 # mask some services that we do not want to run in these tests
21 ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
22 ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
23 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
24 ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
25 ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
26
27 # setup the testsuite service
28 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
29[Unit]
30Description=Testsuite service
31
32[Service]
23209bcd 33ExecStart=/bin/bash -x /testsuite.sh
3ac62a0e
LP
34Type=oneshot
35StandardOutput=tty
36StandardError=tty
37EOF
38 cp testsuite.sh $initdir/
39
40 setup_testsuite
41 ) || return 1
42
43 ddebug "umount $TESTDIR/root"
44 umount $TESTDIR/root
45}
46
47do_test "$@"