]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add log messages
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Mar 2021 05:19:50 +0000 (14:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Mar 2021 14:09:04 +0000 (23:09 +0900)
src/libsystemd/sd-event/test-event.c

index 082b23af70c88bfd7ee8ca5bf8e27201466c0b7a..737595bc33ea40c4ce89e4d07adac4bc93d03bca 100644 (file)
@@ -201,6 +201,8 @@ static void test_basic(bool with_pidfd) {
         uint64_t event_now;
         int64_t priority;
 
+        log_info("/* %s(pidfd=%s) */", __func__, yes_no(with_pidfd));
+
         assert_se(setenv("SYSTEMD_PIDFD", yes_no(with_pidfd), 1) >= 0);
 
         assert_se(pipe(a) >= 0);
@@ -302,6 +304,8 @@ static void test_sd_event_now(void) {
         _cleanup_(sd_event_unrefp) sd_event *e = NULL;
         uint64_t event_now;
 
+        log_info("/* %s */", __func__);
+
         assert_se(sd_event_new(&e) >= 0);
         assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) > 0);
         assert_se(sd_event_now(e, CLOCK_REALTIME, &event_now) > 0);
@@ -339,6 +343,8 @@ static void test_rtqueue(void) {
         sd_event_source *u = NULL, *v = NULL, *s = NULL;
         sd_event *e = NULL;
 
+        log_info("/* %s */", __func__);
+
         assert_se(sd_event_default(&e) >= 0);
 
         assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN+2, SIGRTMIN+3, SIGUSR2, -1) >= 0);
@@ -479,6 +485,8 @@ static void test_inotify(unsigned n_create_events) {
         const char *q;
         unsigned i;
 
+        log_info("/* %s(%u) */", __func__, n_create_events);
+
         assert_se(sd_event_default(&e) >= 0);
 
         assert_se(mkdtemp_malloc("/tmp/test-inotify-XXXXXX", &p) >= 0);
@@ -545,6 +553,8 @@ static void test_pidfd(void) {
         int pidfd;
         pid_t pid, pid2;
 
+        log_info("/* %s */", __func__);
+
         assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
 
         pid = fork();
@@ -619,6 +629,8 @@ static void test_ratelimit(void) {
         uint64_t interval;
         unsigned count, burst;
 
+        log_info("/* %s */", __func__);
+
         assert_se(sd_event_default(&e) >= 0);
         assert_se(pipe2(p, O_CLOEXEC|O_NONBLOCK) >= 0);