Lines Matching refs:fdset

24 #include "fdset.h"
31 _cleanup_fdset_free_ FDSet *fdset = NULL;
36 assert_se(fdset_new_fill(&fdset) >= 0);
37 assert_se(fdset_contains(fdset, fd));
45 _cleanup_fdset_free_ FDSet *fdset = NULL;
51 fdset = fdset_new();
52 assert_se(fdset);
53 copyfd = fdset_put_dup(fdset, fd);
55 assert_se(fdset_contains(fdset, copyfd));
56 assert_se(!fdset_contains(fdset, fd));
63 _cleanup_fdset_free_ FDSet *fdset = NULL;
70 fdset = fdset_new();
71 assert_se(fdset);
72 assert_se(fdset_put(fdset, fd));
74 assert_se(fdset_cloexec(fdset, false) >= 0);
79 assert_se(fdset_cloexec(fdset, true) >= 0);
90 _cleanup_fdset_free_ FDSet *fdset = NULL;
97 fdset = fdset_new();
98 assert_se(fdset);
99 copyfd = fdset_put_dup(fdset, fd);
102 assert_se(fdset_close_others(fdset) >= 0);
113 FDSet *fdset = NULL;
119 fdset = fdset_new();
120 assert_se(fdset);
121 assert_se(fdset_put(fdset, fd) >= 0);
122 assert_se(fdset_remove(fdset, fd) >= 0);
123 assert_se(!fdset_contains(fdset, fd));
124 fdset_free(fdset);
133 FDSet *fdset = NULL;
142 fdset = fdset_new();
143 assert_se(fdset);
144 assert_se(fdset_put(fdset, fd) >= 0);
145 assert_se(fdset_put(fdset, fd) >= 0);
146 assert_se(fdset_put(fdset, fd) >= 0);
148 FDSET_FOREACH(a, fdset, i) {
154 fdset_free(fdset);
161 _cleanup_fdset_free_ FDSet *fdset = NULL;
167 fdset = fdset_new();
168 assert_se(fdset);
170 assert_se(fdset_isempty(fdset));
171 assert_se(fdset_put(fdset, fd) >= 0);
172 assert_se(!fdset_isempty(fdset));
179 _cleanup_fdset_free_ FDSet *fdset = NULL;
185 fdset = fdset_new();
186 assert_se(fdset);
188 assert_se(fdset_steal_first(fdset) < 0);
189 assert_se(fdset_put(fdset, fd) >= 0);
190 assert_se(fdset_steal_first(fdset) == fd);
191 assert_se(fdset_steal_first(fdset) < 0);
192 assert_se(fdset_put(fdset, fd) >= 0);
199 _cleanup_fdset_free_ FDSet *fdset = NULL;
201 assert_se(fdset_new_array(&fdset, fds, 4) >= 0);
202 assert_se(fdset_size(fdset) == 4);
203 assert_se(fdset_contains(fdset, 10));
204 assert_se(fdset_contains(fdset, 11));
205 assert_se(fdset_contains(fdset, 12));
206 assert_se(fdset_contains(fdset, 13));