summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-03 13:04:06 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-03 13:04:06 +0100
commit8ba576d0e698aebd153c4276aa024dcc5fc99525 (patch)
treeb899e66a106f5dd8fac42ba835035f33b2d919e8 /src/test
parent5dea1c1e7902ca07ca1ea7f1914031c6e3a27be5 (diff)
parent7dcc56715d150ff7e8b5459877879430cff790f7 (diff)
Merge pull request #1744 from evverx/fix-debug-generator
debug-generator: respect kernel parameters for default unit setting
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 647df4f5c3..f6ed55878c 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -48,6 +48,7 @@
#include "process-util.h"
#include "rm-rf.h"
#include "signal-util.h"
+#include "special.h"
#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
@@ -1638,6 +1639,12 @@ cleanup:
assert_se(rmdir(t) >= 0);
}
+static void test_runlevel_to_target(void) {
+ 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("3"), SPECIAL_MULTI_USER_TARGET));
+}
+
int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
@@ -1718,6 +1725,7 @@ int main(int argc, char *argv[]) {
test_tempfn();
test_strcmp_ptr();
test_fgetxattrat_fake();
+ test_runlevel_to_target();
return 0;
}