Lines Matching refs:e
199 sd_event *e = NULL; in test_basic_one() local
215 assert_se(sd_event_default(&e) >= 0); in test_basic_one()
216 assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) > 0); in test_basic_one()
218 assert_se(sd_event_set_watchdog(e, true) >= 0); in test_basic_one()
222 assert_se(sd_event_add_io(e, &t, k[0], EPOLLIN, unref_handler, NULL) >= 0); in test_basic_one()
224 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
231 assert_se(sd_event_add_io(e, &w, d[0], EPOLLIN, io_handler, INT_TO_PTR('d')) >= 0); in test_basic_one()
234 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
237 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
240 assert_se(sd_event_add_io(e, &x, a[0], EPOLLIN, io_handler, INT_TO_PTR('a')) >= 0); in test_basic_one()
241 assert_se(sd_event_add_io(e, &y, b[0], EPOLLIN, io_handler, INT_TO_PTR('b')) >= 0); in test_basic_one()
244 … assert_se(sd_event_add_time(e, &z, CLOCK_MONOTONIC, 0, 0, time_handler, INT_TO_PTR('c')) >= 0); in test_basic_one()
245 assert_se(sd_event_add_exit(e, &q, exit_handler, INT_TO_PTR('g')) >= 0); in test_basic_one()
258 assert_se(sd_event_add_signal(e, NULL, SIGRTMIN+1, NULL, NULL) >= 0); in test_basic_one()
265 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
269 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
273 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in test_basic_one()
281 assert_se(sd_event_add_post(e, NULL, post_handler, NULL) >= 0); in test_basic_one()
282 assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) == 0); in test_basic_one()
286 assert_se(sd_event_loop(e) >= 0); in test_basic_one()
295 sd_event_unref(e); in test_basic_one()
311 _cleanup_(sd_event_unrefp) sd_event *e = NULL; in TEST()
314 assert_se(sd_event_new(&e) >= 0); in TEST()
315 assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) > 0); in TEST()
316 assert_se(sd_event_now(e, CLOCK_REALTIME, &event_now) > 0); in TEST()
317 assert_se(sd_event_now(e, CLOCK_REALTIME_ALARM, &event_now) > 0); in TEST()
318 assert_se(sd_event_now(e, CLOCK_BOOTTIME, &event_now) > 0); in TEST()
319 assert_se(sd_event_now(e, CLOCK_BOOTTIME_ALARM, &event_now) > 0); in TEST()
320 assert_se(sd_event_now(e, -1, &event_now) == -EOPNOTSUPP); in TEST()
321 assert_se(sd_event_now(e, 900 /* arbitrary big number */, &event_now) == -EOPNOTSUPP); in TEST()
323 assert_se(sd_event_run(e, 0) == 0); in TEST()
325 assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) == 0); in TEST()
326 assert_se(sd_event_now(e, CLOCK_REALTIME, &event_now) == 0); in TEST()
327 assert_se(sd_event_now(e, CLOCK_REALTIME_ALARM, &event_now) == 0); in TEST()
328 assert_se(sd_event_now(e, CLOCK_BOOTTIME, &event_now) == 0); in TEST()
329 assert_se(sd_event_now(e, CLOCK_BOOTTIME_ALARM, &event_now) == 0); in TEST()
330 assert_se(sd_event_now(e, -1, &event_now) == -EOPNOTSUPP); in TEST()
331 assert_se(sd_event_now(e, 900 /* arbitrary big number */, &event_now) == -EOPNOTSUPP); in TEST()
345 sd_event *e = NULL; in TEST() local
347 assert_se(sd_event_default(&e) >= 0); in TEST()
350 assert_se(sd_event_add_signal(e, &u, SIGRTMIN+2, rtqueue_handler, NULL) >= 0); in TEST()
351 assert_se(sd_event_add_signal(e, &v, SIGRTMIN+3, rtqueue_handler, NULL) >= 0); in TEST()
352 assert_se(sd_event_add_signal(e, &s, SIGUSR2, rtqueue_handler, NULL) >= 0); in TEST()
365 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in TEST()
369 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in TEST()
373 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in TEST()
377 assert_se(sd_event_run(e, UINT64_MAX) >= 1); in TEST()
381 …assert_se(sd_event_run(e, 0) == 0); /* the other SIGUSR2 is dropped, because the first one was sti… in TEST()
389 sd_event_unref(e); in TEST()
482 sd_event *e = NULL; in test_inotify_one() local
488 assert_se(sd_event_default(&e) >= 0); in test_inotify_one()
492 … assert_se(sd_event_add_inotify(e, &a, p, IN_CREATE|IN_ONLYDIR, inotify_handler, &context) >= 0); in test_inotify_one()
493 …assert_se(sd_event_add_inotify(e, &b, p, IN_CREATE|IN_DELETE|IN_DONT_FOLLOW, inotify_handler, &con… in test_inotify_one()
496 …assert_se(sd_event_add_inotify(e, &c, p, IN_CREATE|IN_DELETE|IN_EXCL_UNLINK, inotify_handler, &con… in test_inotify_one()
505 … assert_se(sd_event_add_inotify(e, &d, q, IN_DELETE_SELF, delete_self_handler, &context) >= 0); in test_inotify_one()
519 assert_se(sd_event_loop(e) >= 0); in test_inotify_one()
526 sd_event_unref(e); in test_inotify_one()
555 sd_event *e = NULL; in TEST() local
582 assert_se(sd_event_default(&e) >= 0); in TEST()
583 … assert_se(sd_event_add_child_pidfd(e, &s, pidfd, WEXITED, pidfd_handler, INT_TO_PTR('p')) >= 0); in TEST()
587 assert_se(sd_event_add_child(e, &t, pid2, WEXITED, pidfd_handler, INT_TO_PTR('q')) >= 0); in TEST()
590 assert_se(sd_event_loop(e) >= 0); in TEST()
600 sd_event_unref(e); in TEST()
633 _cleanup_(sd_event_unrefp) sd_event *e = NULL; in TEST()
638 assert_se(sd_event_default(&e) >= 0); in TEST()
641 assert_se(sd_event_add_io(e, &s, p[0], EPOLLIN, ratelimit_io_handler, &count) >= 0); in TEST()
652 assert_se(sd_event_run(e, UINT64_MAX) >= 0); in TEST()
666 assert_se(sd_event_run(e, UINT64_MAX) >= 0); in TEST()
676 …assert_se(sd_event_add_time_relative(e, &s, CLOCK_MONOTONIC, 1000, 1, ratelimit_time_handler, &cou… in TEST()
680 assert_se(sd_event_run(e, UINT64_MAX) >= 0); in TEST()
696 assert_se(sd_event_run(e, UINT64_MAX) >= 0); in TEST()
703 assert_se(sd_event_run(e, UINT64_MAX) >= 0); in TEST()
708 _cleanup_(sd_event_unrefp) sd_event *e = NULL; in TEST()
713 assert_se(sd_event_default(&e) >= 0); in TEST()
715 assert_se(sd_event_prepare(e) == 0); in TEST()
718 assert_se(sd_event_wait(e, some_time) >= 0); in TEST()
744 _cleanup_(sd_event_unrefp) sd_event *e = NULL; in TEST()
750 assert_se(sd_event_default(&e) >= 0); in TEST()
754 … assert_se(sd_event_add_inotify_fd(e, &s, fd, IN_ATTRIB, inotify_self_destroy_handler, &s) >= 0); in TEST()
757 assert_se(sd_event_loop(e) >= 0); in TEST()