summaryrefslogtreecommitdiff
path: root/src/test/test-unit-file.c
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2015-06-05 23:12:25 -0700
committerFilipe Brandenburger <filbranden@google.com>2015-06-17 11:12:12 -0700
commitc83f1f30b80253de8a1a6034e7b016fa55d24523 (patch)
tree54674c852ff4032585c0d710be3ee8aeb5ff3804 /src/test/test-unit-file.c
parent46a0d98ac0fb5b507a6423e60058a2483830b432 (diff)
load-fragment: reset the list on an ExecStart= containing only whitespace
This is consistent with how an empty string works in an ExecStart= statement. We should not differentiate between an empty string and whitespace only (since they look the same.) Update the test case with whitespace only to reflect that the list is reset. Tested that `test-unit-file` passes and other test cases are not affected. Installed the patched systemd binaries on a machine, booted it, looked for out of the usual behavior but did not find any.
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r--src/test/test-unit-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index c7e8353b3b..8358789e6f 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -145,19 +145,19 @@ static void test_config_parse_exec(void) {
assert_se(r == 0);
assert_se(c1->command_next == NULL);
- log_info("/* no command, check for bad memory access */");
+ log_info("/* no command, whitespace only, reset */");
r = config_parse_exec(NULL, "fake", 3, "section", 1,
"LValue", 0, " ",
&c, NULL);
assert_se(r == 0);
- assert_se(c1->command_next == NULL);
+ assert_se(c == NULL);
log_info("/* ignore && honour_argv0 */");
r = config_parse_exec(NULL, "fake", 4, "section", 1,
"LValue", 0, "-@/RValue///slashes3 argv0a r1",
&c, NULL);
assert_se(r >= 0);
- c1 = c1->command_next;
+ c1 = c;
check_execcommand(c1, "/RValue/slashes3", "argv0a", "r1", NULL, true);
log_info("/* ignore && honour_argv0 */");