summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-event/test-event.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-03-11 14:19:50 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-11 23:09:04 +0900
commit7fe11e84c2702835cf063c29e0500680629a41de (patch)
tree2e4be4ef1b83a413c648b58d0b321c7f3ee424f8 /src/libsystemd/sd-event/test-event.c
parent47d1cae6cf9f018df5ab4da0ea4e33d1e5121830 (diff)
downloadsystemd-7fe11e84c2702835cf063c29e0500680629a41de.tar.gz
test: add log messages
Diffstat (limited to 'src/libsystemd/sd-event/test-event.c')
-rw-r--r--src/libsystemd/sd-event/test-event.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 082b23af70..737595bc33 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -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);