[systemd-devel] [PATCH v3] tests: added tests for unit_file_get_{state, list}
Ken Sedgwick
ksedgwic at bonsai.com
Tue Oct 14 14:44:23 PDT 2014
This test constructs different unit file states and checks the output
of unit_file_get_state and unit_file_get_list for each.
This test characterizes the current output of the master branch in
preparation for a patch which improves the performance of unit state
detection in the face of thousands of units.
---
.gitignore | 1 +
Makefile.am | 44 ++++++-
src/test/test-enabled.c | 141 +++++++++++++++++++++
.../etc/systemd/system/masked.service | 1 +
.../etc/systemd/system/maskedstatic.service | 1 +
.../etc/systemd/system/some.target | 11 ++
.../system/some.target.wants/aliased.service | 1 +
.../system/some.target.wants/also_masked.service | 1 +
.../system/some.target.wants/another.service | 1 +
.../system/some.target.wants/different.service | 1 +
.../system/some.target.wants/masked.service | 1 +
.../some.target.wants/templating at four.service | 1 +
.../some.target.wants/templating at one.service | 1 +
.../some.target.wants/templating at three.service | 1 +
.../some.target.wants/templating at two.service | 1 +
.../run/systemd/system/maskedruntime.service | 1 +
.../run/systemd/system/maskedruntimestatic.service | 1 +
.../run/systemd/system/other.target | 14 ++
.../system/other.target.wants/runtime.service | 1 +
.../usr/lib/systemd/system/another.service | 9 ++
.../usr/lib/systemd/system/disabled.service | 9 ++
.../usr/lib/systemd/system/invalid.service | 1 +
.../usr/lib/systemd/system/masked.service | 9 ++
.../usr/lib/systemd/system/maskedruntime.service | 9 ++
.../lib/systemd/system/maskedruntimestatic.service | 6 +
.../usr/lib/systemd/system/maskedstatic.service | 6 +
.../usr/lib/systemd/system/runtime.service | 9 ++
.../usr/lib/systemd/system/static.service | 6 +
.../usr/lib/systemd/system/templating at .service | 9 ++
.../lib/systemd/system/templating at three.service | 9 ++
.../usr/lib/systemd/system/templating at two.service | 9 ++
.../usr/lib/systemd/system/unique.service | 9 ++
32 files changed, 322 insertions(+), 3 deletions(-)
create mode 100644 src/test/test-enabled.c
create mode 120000 test/test-enabled-root/etc/systemd/system/masked.service
create mode 120000 test/test-enabled-root/etc/systemd/system/maskedstatic.service
create mode 100644 test/test-enabled-root/etc/systemd/system/some.target
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/aliased.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/also_masked.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/another.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/different.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/masked.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/templating at four.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/templating at one.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/templating at three.service
create mode 120000 test/test-enabled-root/etc/systemd/system/some.target.wants/templating at two.service
create mode 120000 test/test-enabled-root/run/systemd/system/maskedruntime.service
create mode 120000 test/test-enabled-root/run/systemd/system/maskedruntimestatic.service
create mode 100644 test/test-enabled-root/run/systemd/system/other.target
create mode 120000 test/test-enabled-root/run/systemd/system/other.target.wants/runtime.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/another.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/disabled.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/invalid.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/masked.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/maskedruntime.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/maskedruntimestatic.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/maskedstatic.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/runtime.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/static.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/templating at .service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/templating at three.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/templating at two.service
create mode 100644 test/test-enabled-root/usr/lib/systemd/system/unique.service
diff --git a/.gitignore b/.gitignore
index f119b57..97b2b2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,6 +173,7 @@
/test-icmp6-rs
/test-ellipsize
/test-engine
+/test-enabled
/test-env-replace
/test-event
/test-fdset
diff --git a/Makefile.am b/Makefile.am
index e52db17..7d4f2f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1358,7 +1358,8 @@ tests += \
test-ratelimit \
test-condition-util \
test-uid-range \
- test-bus-policy
+ test-bus-policy \
+ test-enabled
EXTRA_DIST += \
test/a.service \
@@ -1394,8 +1395,36 @@ EXTRA_DIST += \
test/bus-policy/hello.conf \
test/bus-policy/methods.conf \
test/bus-policy/ownerships.conf \
- test/bus-policy/signals.conf
-
+ test/bus-policy/signals.conf \
+ test/test-enabled-root/usr/lib/systemd/system/masked.service \
+ test/test-enabled-root/usr/lib/systemd/system/runtime.service \
+ test/test-enabled-root/usr/lib/systemd/system/maskedruntime.service \
+ test/test-enabled-root/usr/lib/systemd/system/another.service \
+ test/test-enabled-root/usr/lib/systemd/system/templating at three.service \
+ test/test-enabled-root/usr/lib/systemd/system/maskedstatic.service \
+ test/test-enabled-root/usr/lib/systemd/system/invalid.service \
+ test/test-enabled-root/usr/lib/systemd/system/disabled.service \
+ test/test-enabled-root/usr/lib/systemd/system/templating at two.service \
+ test/test-enabled-root/usr/lib/systemd/system/unique.service \
+ test/test-enabled-root/usr/lib/systemd/system/templating at .service \
+ test/test-enabled-root/usr/lib/systemd/system/static.service \
+ test/test-enabled-root/usr/lib/systemd/system/maskedruntimestatic.service \
+ test/test-enabled-root/run/systemd/system/other.target.wants/runtime.service \
+ test/test-enabled-root/run/systemd/system/maskedruntime.service \
+ test/test-enabled-root/run/systemd/system/other.target \
+ test/test-enabled-root/run/systemd/system/maskedruntimestatic.service \
+ test/test-enabled-root/etc/systemd/system/masked.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/masked.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/another.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/templating at three.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/templating at one.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/templating at two.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/templating at four.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/also_masked.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/different.service \
+ test/test-enabled-root/etc/systemd/system/some.target.wants/aliased.service \
+ test/test-enabled-root/etc/systemd/system/maskedstatic.service \
+ test/test-enabled-root/etc/systemd/system/some.target
EXTRA_DIST += \
src/test/test-helper.h
@@ -1782,6 +1811,15 @@ test_install_LDADD = \
libsystemd-shared.la \
libsystemd-internal.la
+test_enabled_SOURCES = \
+ src/test/test-enabled.c
+
+test_enabled_LDADD = \
+ libsystemd-units.la \
+ libsystemd-label.la \
+ libsystemd-shared.la \
+ libsystemd-internal.la
+
test_watchdog_SOURCES = \
src/test/test-watchdog.c
diff --git a/src/test/test-enabled.c b/src/test/test-enabled.c
new file mode 100644
index 0000000..104348e
--- /dev/null
+++ b/src/test/test-enabled.c
@@ -0,0 +1,141 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+ This file is part of systemd.
+
+ Copyright 2014 Pantheon, Inc.
+
+ 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.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+#include <fcntl.h>
+
+#include "util.h"
+#include "path-util.h"
+#include "unit-name.h"
+#include "install.h"
+
+/*
+.
+├── etc
+│ └── systemd
+│ └── system
+│ ├── masked.service -> /dev/null
+│ ├── maskedstatic.service -> /dev/null
+│ ├── some.target
+│ └── some.target.wants
+│ ├── another.service -> ../../../../usr/lib/systemd/system/another.service
+│ ├── aliased.service -> ../../../../usr/lib/systemd/system/another.service
+│ ├── different.service -> ../../../../usr/lib/systemd/system/unique.service
+│ ├── masked.service -> ../../../../usr/lib/systemd/system/masked.service
+│ ├── also_masked.service -> ../../../../usr/lib/systemd/system/masked.service
+│ ├── templating at one.service -> ../../../../usr/lib/systemd/system/templating at .service
+│ ├── templating at two.service -> ../../../../usr/lib/systemd/system/templating at two.service
+│ ├── templating at three.service -> ../../../../usr/lib/systemd/system/templating at .service
+│ └── templating at four.service -> ../../../../usr/lib/systemd/system/templating at four.service
+├── run
+│ └── systemd
+│ └── system
+│ ├── maskedruntime.service -> /dev/null
+│ ├── maskedruntimestatic.service -> /dev/null
+│ ├── other.target
+│ └── other.target.wants
+│ └── runtime.service -> ../../../../usr/lib/systemd/system/runtime.service
+└── usr
+ └── lib
+ └── systemd
+ └── system
+ ├── invalid.service
+ ├── disabled.service
+ ├── another.service
+ ├── runtime.service
+ ├── masked.service
+ ├── maskedruntime.service
+ ├── static.service
+ ├── maskedstatic.service
+ ├── maskedruntimestatic.service
+ ├── templating at .service
+ ├── templating at two.service
+ ├── templating at three.service
+ └── unique.service
+*/
+
+
+#define confirm_unit_state(unit, expected) \
+ assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root_dir, unit) == expected)
+
+static void test_enabled(int argc, char* argv[]) {
+ Hashmap *h;
+ UnitFileList *p;
+ Iterator i;
+ int r;
+ const char *root_dir;
+
+ root_dir = strappenda(TEST_DIR, "/test-enabled-root");
+
+ confirm_unit_state("nonexistent.service", -ENOENT);
+ confirm_unit_state("invalid.service", -EBADMSG);
+ confirm_unit_state("disabled.service", UNIT_FILE_DISABLED);
+ confirm_unit_state("another.service", UNIT_FILE_ENABLED);
+ confirm_unit_state("runtime.service", UNIT_FILE_ENABLED_RUNTIME);
+ confirm_unit_state("masked.service", UNIT_FILE_MASKED);
+ confirm_unit_state("maskedruntime.service", UNIT_FILE_MASKED_RUNTIME);
+ confirm_unit_state("static.service", UNIT_FILE_STATIC);
+ confirm_unit_state("maskedstatic.service", UNIT_FILE_MASKED);
+ confirm_unit_state("maskedruntimestatic.service", UNIT_FILE_MASKED_RUNTIME);
+ confirm_unit_state("templating at .service", UNIT_FILE_ENABLED);
+ confirm_unit_state("templating at two.service", UNIT_FILE_ENABLED);
+ confirm_unit_state("templating at three.service", UNIT_FILE_ENABLED);
+ confirm_unit_state("unique.service", UNIT_FILE_ENABLED);
+
+ h = hashmap_new(&string_hash_ops);
+ r = unit_file_get_list(UNIT_FILE_SYSTEM, root_dir, h);
+ assert_se(r >= 0);
+
+ HASHMAP_FOREACH(p, h, i) {
+ UnitFileState s;
+
+ s = unit_file_get_state(UNIT_FILE_SYSTEM, root_dir,
+ basename(p->path));
+
+ /* unit_file_get_list and unit_file_get_state are
+ * a little different in some cases. Handle these
+ * cases here ...
+ */
+ switch ((int)s) {
+ case UNIT_FILE_ENABLED_RUNTIME:
+ assert_se(p->state == UNIT_FILE_ENABLED);
+ break;
+ case -EBADMSG:
+ assert_se(p->state == UNIT_FILE_INVALID);
+ break;
+ default:
+ assert_se(p->state == s);
+ break;
+ }
+
+ fprintf(stderr, "%s (%s)\n",
+ p->path,
+ unit_file_state_to_string(p->state));
+ }
+ unit_file_list_free(h);
+}
+
+int main(int argc, char* argv[]) {
+ test_enabled(argc, argv);
+ return 0;
+}
diff --git a/test/test-enabled-root/etc/systemd/system/masked.service b/test/test-enabled-root/etc/systemd/system/masked.service
new file mode 120000
index 0000000..dc1dc0c
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/masked.service
@@ -0,0 +1 @@
+/dev/null
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/maskedstatic.service b/test/test-enabled-root/etc/systemd/system/maskedstatic.service
new file mode 120000
index 0000000..dc1dc0c
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/maskedstatic.service
@@ -0,0 +1 @@
+/dev/null
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target b/test/test-enabled-root/etc/systemd/system/some.target
new file mode 100644
index 0000000..06eb04e
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target
@@ -0,0 +1,11 @@
+# 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=Some sort of target.
+Requires=multi-user.target
+After=multi-user.target
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/aliased.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/aliased.service
new file mode 120000
index 0000000..fec3d43
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/aliased.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/another.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/also_masked.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/also_masked.service
new file mode 120000
index 0000000..322a87b
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/also_masked.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/masked.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/another.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/another.service
new file mode 120000
index 0000000..fec3d43
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/another.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/another.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/different.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/different.service
new file mode 120000
index 0000000..40b36c8
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/different.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/unique.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/masked.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/masked.service
new file mode 120000
index 0000000..322a87b
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/masked.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/masked.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at four.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at four.service
new file mode 120000
index 0000000..7ccde6b
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at four.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/templating at four.service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at one.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at one.service
new file mode 120000
index 0000000..16f781d
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at one.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/templating at .service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at three.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at three.service
new file mode 120000
index 0000000..16f781d
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at three.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/templating at .service
\ No newline at end of file
diff --git a/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at two.service b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at two.service
new file mode 120000
index 0000000..ee2c510
--- /dev/null
+++ b/test/test-enabled-root/etc/systemd/system/some.target.wants/templating at two.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/templating at two.service
\ No newline at end of file
diff --git a/test/test-enabled-root/run/systemd/system/maskedruntime.service b/test/test-enabled-root/run/systemd/system/maskedruntime.service
new file mode 120000
index 0000000..dc1dc0c
--- /dev/null
+++ b/test/test-enabled-root/run/systemd/system/maskedruntime.service
@@ -0,0 +1 @@
+/dev/null
\ No newline at end of file
diff --git a/test/test-enabled-root/run/systemd/system/maskedruntimestatic.service b/test/test-enabled-root/run/systemd/system/maskedruntimestatic.service
new file mode 120000
index 0000000..dc1dc0c
--- /dev/null
+++ b/test/test-enabled-root/run/systemd/system/maskedruntimestatic.service
@@ -0,0 +1 @@
+/dev/null
\ No newline at end of file
diff --git a/test/test-enabled-root/run/systemd/system/other.target b/test/test-enabled-root/run/systemd/system/other.target
new file mode 100644
index 0000000..0f54eb3
--- /dev/null
+++ b/test/test-enabled-root/run/systemd/system/other.target
@@ -0,0 +1,14 @@
+# 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=Other Target
+Requires=multi-user.target
+After=multi-user.target
+Conflicts=rescue.target
+Wants=display-manager.service
+AllowIsolate=yes
diff --git a/test/test-enabled-root/run/systemd/system/other.target.wants/runtime.service b/test/test-enabled-root/run/systemd/system/other.target.wants/runtime.service
new file mode 120000
index 0000000..a28ebda
--- /dev/null
+++ b/test/test-enabled-root/run/systemd/system/other.target.wants/runtime.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/runtime.service
\ No newline at end of file
diff --git a/test/test-enabled-root/usr/lib/systemd/system/another.service b/test/test-enabled-root/usr/lib/systemd/system/another.service
new file mode 100644
index 0000000..e4ea7f3
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/another.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Another Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Another Service Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/disabled.service b/test/test-enabled-root/usr/lib/systemd/system/disabled.service
new file mode 100644
index 0000000..f1d1fc6
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/disabled.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Disabled Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Disabled Service Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/invalid.service b/test/test-enabled-root/usr/lib/systemd/system/invalid.service
new file mode 100644
index 0000000..e420fe4
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/invalid.service
@@ -0,0 +1 @@
+INVALID
diff --git a/test/test-enabled-root/usr/lib/systemd/system/masked.service b/test/test-enabled-root/usr/lib/systemd/system/masked.service
new file mode 100644
index 0000000..7a64302
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/masked.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Masked Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Masked Service Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/maskedruntime.service b/test/test-enabled-root/usr/lib/systemd/system/maskedruntime.service
new file mode 100644
index 0000000..db50f6e
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/maskedruntime.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Masked Runtime Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Masked Runtime Service Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/maskedruntimestatic.service b/test/test-enabled-root/usr/lib/systemd/system/maskedruntimestatic.service
new file mode 100644
index 0000000..d2a95d2
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/maskedruntimestatic.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Masked Runtime Static Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Masked Runtime Static Service Start"
diff --git a/test/test-enabled-root/usr/lib/systemd/system/maskedstatic.service b/test/test-enabled-root/usr/lib/systemd/system/maskedstatic.service
new file mode 100644
index 0000000..dd2ff1e
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/maskedstatic.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Masked Static Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Masked Static Service Start"
diff --git a/test/test-enabled-root/usr/lib/systemd/system/runtime.service b/test/test-enabled-root/usr/lib/systemd/system/runtime.service
new file mode 100644
index 0000000..0b24bd0
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/runtime.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Runtime Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Runtime Service Start"
+
+[Install]
+WantedBy=other.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/static.service b/test/test-enabled-root/usr/lib/systemd/system/static.service
new file mode 100644
index 0000000..a5f6c11
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/static.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Static Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Static Service Start"
diff --git a/test/test-enabled-root/usr/lib/systemd/system/templating at .service b/test/test-enabled-root/usr/lib/systemd/system/templating at .service
new file mode 100644
index 0000000..57a8c9d
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/templating at .service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Templating Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Templating Service Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/templating at three.service b/test/test-enabled-root/usr/lib/systemd/system/templating at three.service
new file mode 100644
index 0000000..d2b2d6c
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/templating at three.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Templating Three Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Templating Three Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/templating at two.service b/test/test-enabled-root/usr/lib/systemd/system/templating at two.service
new file mode 100644
index 0000000..3517229
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/templating at two.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Templating Two
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Templating Two Start"
+
+[Install]
+WantedBy=some.target
diff --git a/test/test-enabled-root/usr/lib/systemd/system/unique.service b/test/test-enabled-root/usr/lib/systemd/system/unique.service
new file mode 100644
index 0000000..efd176f
--- /dev/null
+++ b/test/test-enabled-root/usr/lib/systemd/system/unique.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Unique Service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/echo "Unique Service Start"
+
+[Install]
+WantedBy=some.target
--
1.9.3
More information about the systemd-devel
mailing list