summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-03 03:01:29 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-03 03:01:29 +0200
commit35374c804d252b949c4bba7604fcf3430013595e (patch)
tree0b57c5bd0e0edefbb45d23a18491797aa1f847ee
parente1d680ad556bc15b6e5821746a5fbc42a736aaf4 (diff)
test: update test-engine.c to work again
-rw-r--r--src/test-engine.c14
-rw-r--r--test2/a.service5
-rw-r--r--test2/b.service5
-rw-r--r--test2/c.service5
-rw-r--r--test2/d.service5
-rw-r--r--test2/e.service5
-rw-r--r--test2/f.service5
-rw-r--r--test2/g.service5
-rw-r--r--test2/h.service5
9 files changed, 39 insertions, 15 deletions
diff --git a/src/test-engine.c b/src/test-engine.c
index 27e16f3484..eb17f580e2 100644
--- a/src/test-engine.c
+++ b/src/test-engine.c
@@ -36,9 +36,9 @@ int main(int argc, char *argv[]) {
assert_se(manager_new(MANAGER_INIT, false, &m) >= 0);
printf("Load1:\n");
- assert_se(manager_load_unit(m, "a.service", NULL, &a) == 0);
- assert_se(manager_load_unit(m, "b.service", NULL, &b) == 0);
- assert_se(manager_load_unit(m, "c.service", NULL, &c) == 0);
+ assert_se(manager_load_unit(m, "a.service", NULL, &a) >= 0);
+ assert_se(manager_load_unit(m, "b.service", NULL, &b) >= 0);
+ assert_se(manager_load_unit(m, "c.service", NULL, &c) >= 0);
manager_dump_units(m, stdout, "\t");
printf("Test1: (Trivial)\n");
@@ -47,8 +47,8 @@ int main(int argc, char *argv[]) {
printf("Load2:\n");
manager_clear_jobs(m);
- assert_se(manager_load_unit(m, "d.service", NULL, &d) == 0);
- assert_se(manager_load_unit(m, "e.service", NULL, &e) == 0);
+ assert_se(manager_load_unit(m, "d.service", NULL, &d) >= 0);
+ assert_se(manager_load_unit(m, "e.service", NULL, &e) >= 0);
manager_dump_units(m, stdout, "\t");
printf("Test2: (Cyclic Order, Unfixable)\n");
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
manager_dump_jobs(m, stdout, "\t");
printf("Load3:\n");
- assert_se(manager_load_unit(m, "g.service", NULL, &g) == 0);
+ assert_se(manager_load_unit(m, "g.service", NULL, &g) >= 0);
manager_dump_units(m, stdout, "\t");
printf("Test5: (Colliding transaction, fail)\n");
@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
manager_dump_jobs(m, stdout, "\t");
printf("Load4:\n");
- assert_se(manager_load_unit(m, "h.service", NULL, &h) == 0);
+ assert_se(manager_load_unit(m, "h.service", NULL, &h) >= 0);
manager_dump_units(m, stdout, "\t");
printf("Test10: (Unmeargable job type of auxiliary job, fail)\n");
diff --git a/test2/a.service b/test2/a.service
index 4ddb8b4622..4168d2d051 100644
--- a/test2/a.service
+++ b/test2/a.service
@@ -1,4 +1,7 @@
-[Meta]
+[Unit]
Description=A
Requires=b.service
Before=b.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/b.service b/test2/b.service
index ca946073d3..e03bae36be 100644
--- a/test2/b.service
+++ b/test2/b.service
@@ -1,3 +1,6 @@
-[Meta]
+[Unit]
Description=B
Wants=f.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/c.service b/test2/c.service
index 8800ff70c7..e2f60a8fbf 100644
--- a/test2/c.service
+++ b/test2/c.service
@@ -1,3 +1,6 @@
-[Meta]
+[Unit]
Description=C
Requires=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/d.service b/test2/d.service
index 279c1716c2..921fd2ee1b 100644
--- a/test2/d.service
+++ b/test2/d.service
@@ -1,5 +1,8 @@
-[Meta]
+[Unit]
Description=D:Cyclic
After=b.service
Before=a.service
Requires=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/e.service b/test2/e.service
index 2e86e33daf..5ba98c7c43 100644
--- a/test2/e.service
+++ b/test2/e.service
@@ -1,5 +1,8 @@
-[Meta]
+[Unit]
Description=E:Cyclic
After=b.service
Before=a.service
Wants=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/f.service b/test2/f.service
index d0b30effd7..7dde681c17 100644
--- a/test2/f.service
+++ b/test2/f.service
@@ -1,2 +1,5 @@
-[Meta]
+[Unit]
Description=F
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/g.service b/test2/g.service
index e811e6083d..cbfa82a454 100644
--- a/test2/g.service
+++ b/test2/g.service
@@ -1,3 +1,6 @@
-[Meta]
+[Unit]
Description=G
Conflicts=e.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test2/h.service b/test2/h.service
index 4b9ffa3e83..74a7751cad 100644
--- a/test2/h.service
+++ b/test2/h.service
@@ -1,3 +1,6 @@
-[Meta]
+[Unit]
Description=H
Wants=g.service
+
+[Service]
+ExecStart=/bin/true