From 55a8efcd6e25d619e4c41ccc72eb82261a27b408 Mon Sep 17 00:00:00 2001 From: Adrian Szyndela Date: Fri, 12 Jun 2020 15:06:54 +0200 Subject: [PATCH] Revert "test: add test for prefix unit loading" This reverts commit 7ce49e656b1377713ade999dfe381807a78313cd. The previous revert (6927aa2bc09726ff1f071770a8ce0c2ea6430b6b) reverts more than it is described within its description. As it is a base for some of subsequent commits in the upstream, they are silently removed, probably because of conflict resolving. Prefix unit loading is a feature that is a victim of such silent removal. Therefore, the feature test is also (temporarily, I hope) removed with this commit. Change-Id: Ie82e5a54852ea08c8b3f0561f304fab6f3434aaf --- src/test/test-engine.c | 7 +------ test/meson.build | 13 ++++--------- test/unit-.service.d/10-override.conf | 2 -- test/unit-with-.service.d/20-override.conf | 2 -- test/unit-with-multiple-.service.d/20-override.conf | 2 -- test/unit-with-multiple-.service.d/30-override.conf | 2 -- test/unit-with-multiple-dashes.service | 6 ------ test/unit-with-multiple-dashes.service.d/10-override.conf | 2 -- 8 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 test/unit-.service.d/10-override.conf delete mode 100644 test/unit-with-.service.d/20-override.conf delete mode 100644 test/unit-with-multiple-.service.d/20-override.conf delete mode 100644 test/unit-with-multiple-.service.d/30-override.conf delete mode 100644 test/unit-with-multiple-dashes.service delete mode 100644 test/unit-with-multiple-dashes.service.d/10-override.conf diff --git a/src/test/test-engine.c b/src/test/test-engine.c index b835114..9159abf 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) { _cleanup_(sd_bus_error_free) sd_bus_error err = SD_BUS_ERROR_NULL; _cleanup_(manager_freep) Manager *m = NULL; Unit *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL, *g = NULL, - *h = NULL, *i = NULL, *a_conj = NULL, *unit_with_multiple_dashes = NULL; + *h = NULL, *i = NULL, *a_conj = NULL; Job *j; int r; @@ -146,10 +146,5 @@ int main(int argc, char *argv[]) { assert_se(!hashmap_get(a->dependencies[UNIT_PROPAGATES_RELOAD_TO], c)); assert_se(!hashmap_get(c->dependencies[UNIT_RELOAD_PROPAGATED_FROM], a)); - assert_se(manager_load_unit(m, "unit-with-multiple-dashes.service", NULL, NULL, &unit_with_multiple_dashes) >= 0); - - assert_se(strv_equal(unit_with_multiple_dashes->documentation, STRV_MAKE("man:test", "man:override2", "man:override3"))); - assert_se(streq_ptr(unit_with_multiple_dashes->description, "override4")); - return 0; } diff --git a/test/meson.build b/test/meson.build index eeb3c5f..e2c03d3 100644 --- a/test/meson.build +++ b/test/meson.build @@ -187,18 +187,13 @@ test_data_files = ''' test-path/path-unit.path test-path/paths.target test-path/sysinit.target - test-umount/empty.mountinfo - test-umount/example.swaps - test-umount/garbled.mountinfo - test-umount/rhbug-1554943.mountinfo testsuite.target timers.target - unit-with-.service.d/20-override.conf - unit-with-multiple-.service.d/20-override.conf - unit-with-multiple-.service.d/30-override.conf - unit-with-multiple-dashes.service - unit-with-multiple-dashes.service.d/10-override.conf unstoppable.service + test-umount/empty.mountinfo + test-umount/garbled.mountinfo + test-umount/rhbug-1554943.mountinfo + test-umount/example.swaps '''.split() if conf.get('ENABLE_RESOLVE') == 1 diff --git a/test/unit-.service.d/10-override.conf b/test/unit-.service.d/10-override.conf deleted file mode 100644 index 916737d..0000000 --- a/test/unit-.service.d/10-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Description=override0 diff --git a/test/unit-with-.service.d/20-override.conf b/test/unit-with-.service.d/20-override.conf deleted file mode 100644 index c6c2438..0000000 --- a/test/unit-with-.service.d/20-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Documentation=man:override1 diff --git a/test/unit-with-multiple-.service.d/20-override.conf b/test/unit-with-multiple-.service.d/20-override.conf deleted file mode 100644 index 62fafd2..0000000 --- a/test/unit-with-multiple-.service.d/20-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Documentation=man:override2 diff --git a/test/unit-with-multiple-.service.d/30-override.conf b/test/unit-with-multiple-.service.d/30-override.conf deleted file mode 100644 index b9616da..0000000 --- a/test/unit-with-multiple-.service.d/30-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Documentation=man:override3 diff --git a/test/unit-with-multiple-dashes.service b/test/unit-with-multiple-dashes.service deleted file mode 100644 index b38b360..0000000 --- a/test/unit-with-multiple-dashes.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=A unit with multiple dashes -Documentation=man:test - -[Service] -ExecStart=/bin/true diff --git a/test/unit-with-multiple-dashes.service.d/10-override.conf b/test/unit-with-multiple-dashes.service.d/10-override.conf deleted file mode 100644 index 982c362..0000000 --- a/test/unit-with-multiple-dashes.service.d/10-override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Unit] -Description=override4 -- 2.7.4