]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: reduce debugging logs in test-event
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 08:08:59 +0000 (17:08 +0900)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 May 2021 19:34:17 +0000 (21:34 +0200)
The logs mostly give no information, but fill CI results.

src/libsystemd/sd-event/test-event.c

index 0bc2f507aa78850b868291285753134f6544c388..7ff1452e0845c70886ef763d3ac93717ab8ccd16 100644 (file)
@@ -438,13 +438,12 @@ static int inotify_handler(sd_event_source *s, const struct inotify_event *ev, v
                 log_info("inotify-handler <%s>: overflow", description);
                 c->create_overflow |= bit;
         } else if (ev->mask & IN_CREATE) {
-                unsigned i;
-
-                log_debug("inotify-handler <%s>: create on %s", description, ev->name);
+                if (streq(ev->name, "sub"))
+                        log_debug("inotify-handler <%s>: create on %s", description, ev->name);
+                else {
+                        unsigned i;
 
-                if (!streq(ev->name, "sub")) {
                         assert_se(safe_atou(ev->name, &i) >= 0);
-
                         assert_se(i < c->n_create_events);
                         c->create_called[i] |= bit;
                 }