diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 14:31:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-14 09:29:57 +0200 |
commit | 6d7c403324091b0ac0797dbd26b9fe61d4aea9a3 (patch) | |
tree | c1e977d368f861961955db8624b61729d30943d2 /src/test/test-ns.c | |
parent | 8b81c382c390d69e48d653c357b4d820bfc149a6 (diff) | |
download | systemd-6d7c403324091b0ac0797dbd26b9fe61d4aea9a3.tar.gz systemd-6d7c403324091b0ac0797dbd26b9fe61d4aea9a3.tar.bz2 systemd-6d7c403324091b0ac0797dbd26b9fe61d4aea9a3.zip |
tests: use a helper function to parse environment and open logging
The advantages are that we save a few lines, and that we can override
logging using environment variables in more test executables.
Diffstat (limited to 'src/test/test-ns.c')
-rw-r--r-- | src/test/test-ns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 4ab70f2306..d3dbb54ca1 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -6,6 +6,7 @@ #include "log.h" #include "namespace.h" +#include "tests.h" int main(int argc, char *argv[]) { const char * const writable[] = { @@ -43,7 +44,7 @@ int main(int argc, char *argv[]) { char tmp_dir[] = "/tmp/systemd-private-XXXXXX", var_tmp_dir[] = "/var/tmp/systemd-private-XXXXXX"; - log_set_max_level(LOG_DEBUG); + test_setup_logging(LOG_DEBUG); assert_se(mkdtemp(tmp_dir)); assert_se(mkdtemp(var_tmp_dir)); |