2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 TEST_DESCRIPTION
="https://github.com/systemd/systemd/issues/2467"
7 .
$TEST_BASE_DIR/test-functions
11 mkdir
-p $TESTDIR/root
12 mount
${LOOPDEV}p1
$TESTDIR/root
14 # Create what will eventually be our root filesystem onto an overlay
17 eval $
(udevadm info
--export --query=env
--name=${LOOPDEV}p2
)
19 setup_basic_environment
20 dracut_install true
rm socat
22 # setup the testsuite service
23 cat >$initdir/etc
/systemd
/system
/testsuite.service
<<'EOF'
25 Description=Testsuite service
31 ExecStart=/bin/sh -e -x -c 'rm -f /tmp/nonexistent; systemctl start test.socket; printf x > test.file; socat -t20 OPEN:test.file UNIX-CONNECT:/run/test.ctl; >/testok'
35 cat >$initdir/etc
/systemd
/system
/test.socket
<<'EOF'
37 ListenStream=/run/test.ctl
40 cat > $initdir/etc
/systemd
/system
/test.service
<<'EOF'
43 ConditionPathExistsGlob=/tmp/nonexistent
53 # mask some services that we do not want to run in these tests
54 ln -s /dev
/null
$initdir/etc
/systemd
/system
/systemd-hwdb-update.service
55 ln -s /dev
/null
$initdir/etc
/systemd
/system
/systemd-journal-catalog-update.service
56 ln -s /dev
/null
$initdir/etc
/systemd
/system
/systemd-networkd.service
57 ln -s /dev
/null
$initdir/etc
/systemd
/system
/systemd-networkd.socket
58 ln -s /dev
/null
$initdir/etc
/systemd
/system
/systemd-resolved.service
60 ddebug
"umount $TESTDIR/root"