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/nspawn/test-patch-uid.c | |
parent | test-condition: make function return void (diff) | |
download | systemd-6d7c403324091b0ac0797dbd26b9fe61d4aea9a3.tar.xz 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/nspawn/test-patch-uid.c')
-rw-r--r-- | src/nspawn/test-patch-uid.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nspawn/test-patch-uid.c b/src/nspawn/test-patch-uid.c index 8e29d3e806..b50f0990d8 100644 --- a/src/nspawn/test-patch-uid.c +++ b/src/nspawn/test-patch-uid.c @@ -5,15 +5,14 @@ #include "log.h" #include "nspawn-patch-uid.h" #include "user-util.h" +#include "tests.h" #include "util.h" int main(int argc, char *argv[]) { uid_t shift, range; int r; - log_set_max_level(LOG_DEBUG); - log_parse_environment(); - log_open(); + test_setup_logging(LOG_DEBUG); if (argc != 4) { log_error("Expected PATH SHIFT RANGE parameters."); |