Lines Matching refs:args
38 struct child_args *args = (struct child_args *) clousure; in do_test_child() local
40 close (args->fds[0][1]); in do_test_child()
41 close (args->fds[1][0]); in do_test_child()
45 FD_SET (args->fds[0][0], &rfds); in do_test_child()
48 ts = timespec_add (ts, (struct timespec) { args->tmo.tv_sec, 0 }); in do_test_child()
50 int r = select (args->fds[0][0] + 1, &rfds, NULL, NULL, &args->tmo); in do_test_child()
55 TEST_COMPARE (args->tmo.tv_sec, 0); in do_test_child()
56 TEST_COMPARE (args->tmo.tv_usec, 0); in do_test_child()
61 xwrite (args->fds[1][1], "foo", 3); in do_test_child()
67 struct child_args *args = (struct child_args *) clousure; in do_test_child_alarm() local
70 struct timeval tv = { .tv_sec = args->tmo.tv_sec, .tv_usec = 0 }; in do_test_child_alarm()
73 if (args->tmo.tv_sec > INT_MAX) in do_test_child_alarm()
79 TEST_VERIFY (tv.tv_sec < args->tmo.tv_sec); in do_test_child_alarm()
86 struct child_args args; in do_test() local
88 xpipe (args.fds[0]); in do_test()
89 xpipe (args.fds[1]); in do_test()
92 args.tmo = (struct timeval) { .tv_sec = 0, .tv_usec = 250000 }; in do_test()
95 result = support_capture_subprocess (do_test_child, &args); in do_test()
103 args.tmo = (struct timeval) { .tv_sec = 0, .tv_usec = 1000000 }; in do_test()
105 result = support_capture_subprocess (do_test_child, &args); in do_test()
111 args.tmo = (struct timeval) { .tv_sec = 0, .tv_usec = 0 }; in do_test()
114 result = support_capture_subprocess (do_test_child, &args); in do_test()
119 xclose (args.fds[0][0]); in do_test()
120 xclose (args.fds[1][1]); in do_test()
122 args.tmo = (struct timeval) { .tv_sec = 10, .tv_usec = 0 }; in do_test()
125 result = support_capture_subprocess (do_test_child_alarm, &args); in do_test()
130 args.tmo = (struct timeval) { .tv_sec = TYPE_MAXIMUM (time_t), in do_test()
134 result = support_capture_subprocess (do_test_child_alarm, &args); in do_test()
139 args.tmo = (struct timeval) { .tv_sec = 0, .tv_usec = 0 }; in do_test()
143 FD_SET (args.fds[1][0], &rfds); in do_test()
145 int r = select (args.fds[1][0] + 1, &rfds, NULL, NULL, &args.tmo); in do_test()