summaryrefslogtreecommitdiffstats
path: root/src/test/test-proc-cmdline.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-08-01 14:25:14 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-16 18:08:00 +0200
commitda33cba0f8cf3d4c23c11218485d8d4f339fc45b (patch)
tree2fc0ffac6982965f38a7c957dab7979c3f4617c2 /src/test/test-proc-cmdline.c
parentutil-lib: move some functions from basic/cgroup-util to shared/cgroup-setup (diff)
downloadsystemd-da33cba0f8cf3d4c23c11218485d8d4f339fc45b.tar.xz
systemd-da33cba0f8cf3d4c23c11218485d8d4f339fc45b.zip
util-lib: move runlevel_to_target() to shared/unit-file
It if of course related to /proc/cmdline parsing, but is higher-level functionality built on top of it. It should be in shared/ because it is something to be used by pid1 and related utilities, not something for level-level libraries.
Diffstat (limited to 'src/test/test-proc-cmdline.c')
-rw-r--r--src/test/test-proc-cmdline.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c
index 6d25a6919e..884fb36010 100644
--- a/src/test/test-proc-cmdline.c
+++ b/src/test/test-proc-cmdline.c
@@ -212,24 +212,6 @@ static void test_proc_cmdline_key_startswith(void) {
assert_se(!proc_cmdline_key_startswith("foo-bar", "foo_xx"));
}
-static void test_runlevel_to_target(void) {
- log_info("/* %s */", __func__);
-
- in_initrd_force(false);
- assert_se(streq_ptr(runlevel_to_target(NULL), NULL));
- assert_se(streq_ptr(runlevel_to_target("unknown-runlevel"), NULL));
- assert_se(streq_ptr(runlevel_to_target("rd.unknown-runlevel"), NULL));
- assert_se(streq_ptr(runlevel_to_target("3"), SPECIAL_MULTI_USER_TARGET));
- assert_se(streq_ptr(runlevel_to_target("rd.rescue"), NULL));
-
- in_initrd_force(true);
- assert_se(streq_ptr(runlevel_to_target(NULL), NULL));
- assert_se(streq_ptr(runlevel_to_target("unknown-runlevel"), NULL));
- assert_se(streq_ptr(runlevel_to_target("rd.unknown-runlevel"), NULL));
- assert_se(streq_ptr(runlevel_to_target("3"), NULL));
- assert_se(streq_ptr(runlevel_to_target("rd.rescue"), SPECIAL_RESCUE_TARGET));
-}
-
int main(void) {
log_parse_environment();
log_open();
@@ -244,7 +226,6 @@ int main(void) {
test_proc_cmdline_get_key();
test_proc_cmdline_get_bool();
test_proc_cmdline_get_key_many();
- test_runlevel_to_target();
return 0;
}