test: replace symlinks with actual unit files

During installation, meson complains:
> Installing /home/zbyszek/src/systemd-work/test/units/sysinit.target to /var/tmp/systemd-test.Q1FSuj/root/usr/lib/systemd/tests/testdata/units
> Warning: trying to copy a symlink that points to a file. This will copy the file,
> but this will be changed in a future version of Meson to copy the symlink as is. Please update your
> build definitions so that it will not break when the change happens.

It *is* convenient to have those files as symlinks, but it is also confusing,
because symlinks create aliases, and it seems that in those cases we actually
don't want aliases (at least in the case of loopy*.service that'd make the test
pointless).
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-03-20 16:12:12 +01:00
parent 7b43295346
commit f55198f034
16 changed files with 170 additions and 16 deletions

View File

@ -1 +0,0 @@
../../units/basic.target

View File

@ -0,0 +1,22 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Basic System
Documentation=man:systemd.special(7)
Requires=sysinit.target
Wants=sockets.target timers.target paths.target slices.target
After=sysinit.target sockets.target paths.target slices.target tmp.mount
# We support /var, /tmp, /var/tmp, being on NFS, but we don't pull in
# remote-fs.target by default, hence pull them in explicitly here. Note that we
# require /var and /var/tmp, but only add a Wants= type dependency on /tmp, as
# we support that unit being masked, and this should not be considered an error.
RequiresMountsFor=/var /var/tmp
Wants=tmp.mount

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
path-service.service

View File

@ -0,0 +1,6 @@
[Unit]
Description=Service Test for Path units
[Service]
ExecStart=/bin/true
Type=oneshot

View File

@ -1 +0,0 @@
../../units/paths.target

View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Paths
Documentation=man:systemd.special(7)

View File

@ -1 +0,0 @@
../../units/sysinit.target

View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
Conflicts=emergency.service emergency.target
Wants=local-fs.target swap.target
After=local-fs.target swap.target emergency.service emergency.target

View File

@ -1 +0,0 @@
../../units/basic.target

22
test/units/basic.target Normal file
View File

@ -0,0 +1,22 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Basic System
Documentation=man:systemd.special(7)
Requires=sysinit.target
Wants=sockets.target timers.target paths.target slices.target
After=sysinit.target sockets.target paths.target slices.target tmp.mount
# We support /var, /tmp, /var/tmp, being on NFS, but we don't pull in
# remote-fs.target by default, hence pull them in explicitly here. Note that we
# require /var and /var/tmp, but only add a Wants= type dependency on /tmp, as
# we support that unit being masked, and this should not be considered an error.
RequiresMountsFor=/var /var/tmp
Wants=tmp.mount

View File

@ -1 +0,0 @@
loopy.service

View File

@ -0,0 +1,2 @@
[Service]
ExecStart=/bin/true

View File

@ -1 +0,0 @@
loopy3.service

View File

@ -0,0 +1,5 @@
[Service]
ExecStart=/bin/true
[Unit]
Conflicts=loopy4.service

View File

@ -1 +0,0 @@
../../units/shutdown.target

View File

@ -0,0 +1,14 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Shutdown
Documentation=man:systemd.special(7)
DefaultDependencies=no
RefuseManualStart=yes

View File

@ -1 +0,0 @@
../../units/sockets.target

12
test/units/sockets.target Normal file
View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Sockets
Documentation=man:systemd.special(7)

View File

@ -1 +0,0 @@
../../units/sysinit.target

15
test/units/sysinit.target Normal file
View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
Conflicts=emergency.service emergency.target
Wants=local-fs.target swap.target
After=local-fs.target swap.target emergency.service emergency.target

View File

@ -1 +0,0 @@
../../units/timers.target

15
test/units/timers.target Normal file
View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Timers
Documentation=man:systemd.special(7)
DefaultDependencies=no
Conflicts=shutdown.target