diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-11 00:00:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 00:00:34 +0200 |
commit | 08945b59d1f6825c4e7500093db5226766acf620 (patch) | |
tree | b8bccd30faae3e155a86d5c3679cc9af65e4f971 /src/test | |
parent | bdd0f4b6d107eadde374f23f8507cfeb869e78e7 (diff) | |
parent | 79dc477f2fffc5b74601b0041f0d686c31858b66 (diff) | |
download | systemd-08945b59d1f6825c4e7500093db5226766acf620.tar.gz systemd-08945b59d1f6825c4e7500093db5226766acf620.tar.bz2 systemd-08945b59d1f6825c4e7500093db5226766acf620.zip |
Merge pull request #12926 from keszybz/urlify-logs
Urlify CONFIG_FILE and improve SYSTEMD_LOG_LOCATION
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-log.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c index 18ef56ac39..c1f2f8b09d 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -6,6 +6,7 @@ #include "format-util.h" #include "log.h" #include "process-util.h" +#include "string-util.h" #include "util.h" assert_cc(LOG_REALM_REMOVE_LEVEL(LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_FTP | LOG_DEBUG)) @@ -26,6 +27,14 @@ assert_cc(!IS_SYNTHETIC_ERRNO(0)); #define X100(x) X10(X10(x)) #define X1000(x) X100(X10(x)) +static void test_file(void) { + log_info("__FILE__: %s", __FILE__); + log_info("RELATIVE_SOURCE_PATH: %s", RELATIVE_SOURCE_PATH); + log_info("PROJECT_FILE: %s", PROJECT_FILE); + + assert(startswith(__FILE__, RELATIVE_SOURCE_PATH "/")); +} + static void test_log_struct(void) { log_struct(LOG_INFO, "MESSAGE=Waldo PID="PID_FMT" (no errno)", getpid_cached(), @@ -68,6 +77,8 @@ static void test_log_syntax(void) { int main(int argc, char* argv[]) { int target; + test_file(); + for (target = 0; target < _LOG_TARGET_MAX; target++) { log_set_target(target); log_open(); |