summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorLucas Werkmeister <mail@lucaswerkmeister.de>2021-01-14 22:32:55 +0100
committerLennart Poettering <lennart@poettering.net>2021-01-15 09:54:50 +0100
commit8d7dab1fda99a294a5538747bdb1a5960a3c2f43 (patch)
treee3e1e5c590afa651474ff2b9458cf9d6692fb5a0 /src/test
parentmkosi: Only reset file permissions when $SRCDIR is not a mountpoint (diff)
downloadsystemd-8d7dab1fda99a294a5538747bdb1a5960a3c2f43.tar.xz
systemd-8d7dab1fda99a294a5538747bdb1a5960a3c2f43.zip
Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and StandardError=, similar to the existing append:PATH. The code is mostly copied from the related append: code. Fixes #8983.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-execute.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 83816f474c..01e2443777 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -811,6 +811,10 @@ static void test_exec_standardoutput_append(Manager *m) {
test(m, "exec-standardoutput-append.service", 0, CLD_EXITED);
}
+static void test_exec_standardoutput_truncate(Manager *m) {
+ test(m, "exec-standardoutput-truncate.service", 0, CLD_EXITED);
+}
+
static void test_exec_condition(Manager *m) {
test_service(m, "exec-condition-failed.service", SERVICE_FAILURE_EXIT_CODE);
test_service(m, "exec-condition-skip.service", SERVICE_SKIP_CONDITION);
@@ -876,6 +880,7 @@ int main(int argc, char *argv[]) {
entry(test_exec_standardinput),
entry(test_exec_standardoutput),
entry(test_exec_standardoutput_append),
+ entry(test_exec_standardoutput_truncate),
entry(test_exec_supplementarygroups),
entry(test_exec_systemcallerrornumber),
entry(test_exec_systemcallfilter),