From: Zbigniew Jędrzejewski-Szmek Date: Fri, 20 Mar 2020 15:12:12 +0000 (+0100) Subject: test: replace symlinks with actual unit files X-Git-Tag: v246-rc1~682^2~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f55198f03430318ab0e9162d8e2ce563c7ee7225;p=thirdparty%2Fsystemd.git 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). --- diff --git a/test/test-path/basic.target b/test/test-path/basic.target deleted file mode 120000 index a882b72cc9b..00000000000 --- a/test/test-path/basic.target +++ /dev/null @@ -1 +0,0 @@ -../../units/basic.target \ No newline at end of file diff --git a/test/test-path/basic.target b/test/test-path/basic.target new file mode 100644 index 00000000000..4f442922494 --- /dev/null +++ b/test/test-path/basic.target @@ -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 diff --git a/test/test-path/path-changed.service b/test/test-path/path-changed.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-changed.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-changed.service b/test/test-path/path-changed.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-changed.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/path-directorynotempty.service b/test/test-path/path-directorynotempty.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-directorynotempty.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-directorynotempty.service b/test/test-path/path-directorynotempty.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-directorynotempty.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/path-exists.service b/test/test-path/path-exists.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-exists.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-exists.service b/test/test-path/path-exists.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-exists.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/path-existsglob.service b/test/test-path/path-existsglob.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-existsglob.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-existsglob.service b/test/test-path/path-existsglob.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-existsglob.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/path-makedirectory.service b/test/test-path/path-makedirectory.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-makedirectory.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-makedirectory.service b/test/test-path/path-makedirectory.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-makedirectory.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/path-modified.service b/test/test-path/path-modified.service deleted file mode 120000 index 8bdf1788301..00000000000 --- a/test/test-path/path-modified.service +++ /dev/null @@ -1 +0,0 @@ -path-service.service \ No newline at end of file diff --git a/test/test-path/path-modified.service b/test/test-path/path-modified.service new file mode 100644 index 00000000000..f8499ec6195 --- /dev/null +++ b/test/test-path/path-modified.service @@ -0,0 +1,6 @@ +[Unit] +Description=Service Test for Path units + +[Service] +ExecStart=/bin/true +Type=oneshot diff --git a/test/test-path/paths.target b/test/test-path/paths.target deleted file mode 120000 index b402796cb91..00000000000 --- a/test/test-path/paths.target +++ /dev/null @@ -1 +0,0 @@ -../../units/paths.target \ No newline at end of file diff --git a/test/test-path/paths.target b/test/test-path/paths.target new file mode 100644 index 00000000000..9b6ed1c13fe --- /dev/null +++ b/test/test-path/paths.target @@ -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) diff --git a/test/test-path/sysinit.target b/test/test-path/sysinit.target deleted file mode 120000 index 9d10e5b2e21..00000000000 --- a/test/test-path/sysinit.target +++ /dev/null @@ -1 +0,0 @@ -../../units/sysinit.target \ No newline at end of file diff --git a/test/test-path/sysinit.target b/test/test-path/sysinit.target new file mode 100644 index 00000000000..b6c16a14120 --- /dev/null +++ b/test/test-path/sysinit.target @@ -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 diff --git a/test/units/basic.target b/test/units/basic.target deleted file mode 120000 index a882b72cc9b..00000000000 --- a/test/units/basic.target +++ /dev/null @@ -1 +0,0 @@ -../../units/basic.target \ No newline at end of file diff --git a/test/units/basic.target b/test/units/basic.target new file mode 100644 index 00000000000..4f442922494 --- /dev/null +++ b/test/units/basic.target @@ -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 diff --git a/test/units/loopy2.service b/test/units/loopy2.service deleted file mode 120000 index 961b1fe9bc7..00000000000 --- a/test/units/loopy2.service +++ /dev/null @@ -1 +0,0 @@ -loopy.service \ No newline at end of file diff --git a/test/units/loopy2.service b/test/units/loopy2.service new file mode 100644 index 00000000000..9eb645748e5 --- /dev/null +++ b/test/units/loopy2.service @@ -0,0 +1,2 @@ +[Service] +ExecStart=/bin/true diff --git a/test/units/loopy4.service b/test/units/loopy4.service deleted file mode 120000 index 43e5658bcdf..00000000000 --- a/test/units/loopy4.service +++ /dev/null @@ -1 +0,0 @@ -loopy3.service \ No newline at end of file diff --git a/test/units/loopy4.service b/test/units/loopy4.service new file mode 100644 index 00000000000..606e26b5da7 --- /dev/null +++ b/test/units/loopy4.service @@ -0,0 +1,5 @@ +[Service] +ExecStart=/bin/true + +[Unit] +Conflicts=loopy4.service diff --git a/test/units/shutdown.target b/test/units/shutdown.target deleted file mode 120000 index 8e58943bc45..00000000000 --- a/test/units/shutdown.target +++ /dev/null @@ -1 +0,0 @@ -../../units/shutdown.target \ No newline at end of file diff --git a/test/units/shutdown.target b/test/units/shutdown.target new file mode 100644 index 00000000000..d48e6d64942 --- /dev/null +++ b/test/units/shutdown.target @@ -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 diff --git a/test/units/sockets.target b/test/units/sockets.target deleted file mode 120000 index 745480af566..00000000000 --- a/test/units/sockets.target +++ /dev/null @@ -1 +0,0 @@ -../../units/sockets.target \ No newline at end of file diff --git a/test/units/sockets.target b/test/units/sockets.target new file mode 100644 index 00000000000..9af67fdb1fa --- /dev/null +++ b/test/units/sockets.target @@ -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) diff --git a/test/units/sysinit.target b/test/units/sysinit.target deleted file mode 120000 index 9d10e5b2e21..00000000000 --- a/test/units/sysinit.target +++ /dev/null @@ -1 +0,0 @@ -../../units/sysinit.target \ No newline at end of file diff --git a/test/units/sysinit.target b/test/units/sysinit.target new file mode 100644 index 00000000000..b6c16a14120 --- /dev/null +++ b/test/units/sysinit.target @@ -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 diff --git a/test/units/timers.target b/test/units/timers.target deleted file mode 120000 index 7718a126837..00000000000 --- a/test/units/timers.target +++ /dev/null @@ -1 +0,0 @@ -../../units/timers.target \ No newline at end of file diff --git a/test/units/timers.target b/test/units/timers.target new file mode 100644 index 00000000000..b1aa8c797cc --- /dev/null +++ b/test/units/timers.target @@ -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