Lines Matching +full:short +full:- +full:circuits
13 * Test #4: check if dup2(2) cleared close-on-exec flag for duped fd.
16 * Test #7: check if dup2(2) did not clear close-on-exec flag for duped fd.
18 * Test #9: check if fcntl(F_DUPFD) cleared close-on-exec flag for duped fd.
23 * Test #13: check if fcntl(F_DUP2FD) cleared close-on-exec flag for duped fd.
26 * Test #16: check if fcntl(F_DUP2FD) did not clear close-on-exec flag for
31 * Test #19: check if fcntl(F_DUPFD_CLOEXEC) set close-on-exec flag for duped
35 * Test #22: check if fcntl(F_DUP2FD_CLOEXEC) set close-on-exec flag for duped
41 * Test #26: check if dup3(O_CLOEXEC) set close-on-exec flag for duped fd.
44 * Test #29: check if dup3(0) cleared close-on-exec flag for duped fd.
49 * Tests #33-43 : Same as #18-26, 30 & 32 with O_CLOFORK instead of O_CLOEXEC,
92 printf("ok %d - dup(2) works\n", ++test); in main()
94 /* Set close-on-exec */ in main()
101 printf("ok %d - dup2(2) works\n", ++test); in main()
106 printf("no ok %d - dup2(2) didn't give us the right fd\n", in main()
109 printf("ok %d - dup2(2) returned a correct fd\n", test); in main()
111 /* Was close-on-exec cleared? */ in main()
114 printf("not ok %d - dup2(2) didn't clear close-on-exec\n", in main()
117 printf("ok %d - dup2(2) cleared close-on-exec\n", test); in main()
123 * Normally dup and dup2 will clear the close-on-exec in main()
129 * dup2(old, new) when old == new, the syscall short-circuits in main()
134 * the docs are not really followed because close-on-exec in main()
142 * fuckups take out each other and make the end-result the way in main()
147 printf("ok %d - dup2(2) to itself works\n", ++test); in main()
152 printf("not ok %d - dup2(2) didn't give us the right fd\n", in main()
155 printf("ok %d - dup2(2) to itself returned a correct fd\n", in main()
158 /* Was close-on-exec cleared? */ in main()
161 printf("not ok %d - dup2(2) cleared close-on-exec\n", test); in main()
163 printf("ok %d - dup2(2) didn't clear close-on-exec\n", test); in main()
169 printf("not ok %d - fcntl(F_DUPFD) returned wrong fd %d\n", in main()
172 printf("ok %d - fcntl(F_DUPFD) works\n", ++test); in main()
174 /* Was close-on-exec cleared? */ in main()
178 "not ok %d - fcntl(F_DUPFD) didn't clear close-on-exec\n", in main()
181 printf("ok %d - fcntl(F_DUPFD) cleared close-on-exec\n", test); in main()
187 printf("not ok %d - dup2(2) bypassed NOFILE limit\n", test); in main()
189 printf("ok %d - dup2(2) didn't bypass NOFILE limit\n", test); in main()
194 printf("ok %d - fcntl(F_DUP2FD) works\n", ++test); in main()
200 "no ok %d - fcntl(F_DUP2FD) didn't give us the right fd\n", in main()
203 printf("ok %d - fcntl(F_DUP2FD) returned a correct fd\n", in main()
206 /* Was close-on-exec cleared? */ in main()
210 "not ok %d - fcntl(F_DUP2FD) didn't clear close-on-exec\n", in main()
213 printf("ok %d - fcntl(F_DUP2FD) cleared close-on-exec\n", in main()
219 printf("ok %d - fcntl(F_DUP2FD) to itself works\n", ++test); in main()
225 "not ok %d - fcntl(F_DUP2FD) didn't give us the right fd\n", in main()
229 "ok %d - fcntl(F_DUP2FD) to itself returned a correct fd\n", in main()
232 /* Was close-on-exec cleared? */ in main()
235 printf("not ok %d - fcntl(F_DUP2FD) cleared close-on-exec\n", in main()
238 printf("ok %d - fcntl(F_DUP2FD) didn't clear close-on-exec\n", in main()
245 printf("not ok %d - fcntl(F_DUP2FD) bypassed NOFILE limit\n", in main()
248 printf("ok %d - fcntl(F_DUP2FD) didn't bypass NOFILE limit\n", in main()
255 printf("not ok %d - fcntl(F_DUPFD_CLOEXEC) returned wrong fd %d\n", in main()
258 printf("ok %d - fcntl(F_DUPFD_CLOEXEC) works\n", ++test); in main()
260 /* Was close-on-exec cleared? */ in main()
264 "not ok %d - fcntl(F_DUPFD_CLOEXEC) didn't set close-on-exec\n", in main()
267 printf("ok %d - fcntl(F_DUPFD_CLOEXEC) set close-on-exec\n", in main()
273 printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) works\n", ++test); in main()
279 "no ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't give us the right fd\n", in main()
282 printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) returned a correct fd\n", in main()
285 /* Was close-on-exec set? */ in main()
289 "not ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't set close-on-exec\n", in main()
292 printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) set close-on-exec\n", in main()
304 printf("not ok %d - fcntl(F_DUP2FD_CLOEXEC) bypassed NOFILE limit\n", in main()
307 printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't bypass NOFILE limit\n", in main()
313 printf("ok %d - dup3(O_CLOEXEC) works\n", ++test); in main()
319 "no ok %d - dup3(O_CLOEXEC) didn't give us the right fd\n", in main()
322 printf("ok %d - dup3(O_CLOEXEC) returned a correct fd\n", in main()
325 /* Was close-on-exec set? */ in main()
329 "not ok %d - dup3(O_CLOEXEC) didn't set close-on-exec\n", in main()
332 printf("ok %d - dup3(O_CLOEXEC) set close-on-exec\n", in main()
338 printf("ok %d - dup3(0) works\n", ++test); in main()
344 "no ok %d - dup3(0) didn't give us the right fd\n", in main()
347 printf("ok %d - dup3(0) returned a correct fd\n", in main()
350 /* Was close-on-exec cleared? */ in main()
354 "not ok %d - dup3(0) didn't clear close-on-exec\n", in main()
357 printf("ok %d - dup3(0) cleared close-on-exec\n", in main()
362 if (dup3(fd1, fd1, O_CLOEXEC) != -1) in main()
364 "not ok %d - dup3(fd1, fd1, O_CLOEXEC) succeeded\n", test); in main()
366 printf("ok %d - dup3(fd1, fd1, O_CLOEXEC) failed\n", test); in main()
369 if (dup3(fd1, fd1, 0) != -1) in main()
371 "not ok %d - dup3(fd1, fd1, 0) succeeded\n", test); in main()
373 printf("ok %d - dup3(fd1, fd1, 0) failed\n", test); in main()
379 printf("not ok %d - dup3(O_CLOEXEC) bypassed NOFILE limit\n", in main()
382 printf("ok %d - dup3(O_CLOEXEC) didn't bypass NOFILE limit\n", in main()
389 printf("not ok %d - fcntl(F_DUPFD_CLOFORK) returned wrong fd %d\n", in main()
392 printf("ok %d - fcntl(F_DUPFD_CLOFORK) works\n", ++test); in main()
394 /* Was close-on-fork cleared? */ in main()
398 "not ok %d - fcntl(F_DUPFD_CLOFORK) didn't set close-on-fork\n", in main()
401 printf("ok %d - fcntl(F_DUPFD_CLOFORK) set close-on-fork\n", in main()
407 printf("ok %d - dup3(O_CLOFORK) works\n", ++test); in main()
413 "no ok %d - dup3(O_CLOFORK) didn't give us the right fd\n", in main()
416 printf("ok %d - dup3(O_CLOFORK) returned a correct fd\n", in main()
419 /* Was close-on-fork set? */ in main()
423 "not ok %d - dup3(O_CLOFORK) didn't set close-on-fork\n", in main()
426 printf("ok %d - dup3(O_CLOFORK) set close-on-fork\n", in main()
432 printf("ok %d - dup3(0) works\n", ++test); in main()
438 "no ok %d - dup3(0) didn't give us the right fd\n", in main()
441 printf("ok %d - dup3(0) returned a correct fd\n", in main()
444 /* Was close-on-fork cleared? */ in main()
448 "not ok %d - dup3(0) didn't clear close-on-fork\n", in main()
451 printf("ok %d - dup3(0) cleared close-on-fork\n", in main()
456 if (dup3(fd1, fd1, O_CLOFORK) != -1) in main()
458 "not ok %d - dup3(fd1, fd1, O_CLOFORK) succeeded\n", test); in main()
460 printf("ok %d - dup3(fd1, fd1, O_CLOFORK) failed\n", test); in main()
463 if (dup3(fd1, fd1, 0) != -1) in main()
465 "not ok %d - dup3(fd1, fd1, 0) succeeded\n", test); in main()
467 printf("ok %d - dup3(fd1, fd1, 0) failed\n", test); in main()
473 printf("not ok %d - dup3(O_CLOFORK) bypassed NOFILE limit\n", in main()
476 printf("ok %d - dup3(O_CLOFORK) didn't bypass NOFILE limit\n", in main()