1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

test: add log messages

This commit is contained in:
Yu Watanabe 2021-03-11 14:19:50 +09:00
parent 47d1cae6cf
commit 7fe11e84c2

View 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);