Lines Matching refs:test_ctx
78 struct test_ctx { struct
121 get_clock_type(struct test_ctx *tcp) in get_clock_type()
138 get_scm_type(struct test_ctx *tcp) in get_scm_type()
159 get_scm_size(struct test_ctx *tcp) in get_scm_size()
178 setup_ts_sockopt(struct test_ctx *tcp, int fd) in setup_ts_sockopt()
225 setup_udp(struct test_ctx *tcp) in setup_udp()
270 setup_udp6(struct test_ctx *tcp) in setup_udp6()
308 teardown_udp(struct test_ctx *tcp) in teardown_udp()
316 send_pkt(struct test_ctx *tcp, int pnum, int fdidx, const char *face) in send_pkt()
337 hdr_extract_ts(struct test_ctx *tcp, struct msghdr *mhp, struct timespec *tp) in hdr_extract_ts()
383 recv_pkt_recvmsg(struct test_ctx *tcp, int fdidx, const char *face, void *buf, in recv_pkt_recvmsg()
416 recv_pkt_recv(struct test_ctx *tcp, int fdidx, const char *face, void *buf, in recv_pkt_recv()
433 recv_pkt(struct test_ctx *tcp, int fdidx, const char *face, int tout) in recv_pkt()
471 test_server(struct test_ctx *tcp) in test_server()
487 test_client(struct test_ctx *tcp) in test_client()
520 struct test_ctx test_ctx; in test_run() local
526 bzero(&test_ctx, sizeof(test_ctx)); in test_run()
527 test_ctx.name = name; in test_run()
528 test_ctx.use_recvmsg = use_recvmsg; in test_run()
529 test_ctx.ts_type = ts_type; in test_run()
531 setup_udp(&test_ctx); in test_run()
533 setup_udp6(&test_ctx); in test_run()
536 test_ctx.test_pkts[i].pnum = i; in test_run()
537 test_ctx.test_pkts[i].lost = 1; in test_run()
539 test_ctx.test_pkts[i].data[j] = (unsigned char)random(); in test_run()
544 err(1, "%s: fork()", test_ctx.name); in test_run()
547 test_client(&test_ctx); in test_run()
550 test_server(&test_ctx); in test_run()
553 err(1, "%s: waitpid(%d)", test_ctx.name, cpid); in test_run()
569 if (test_ctx.nrecvd < MIN_NRECV) { in test_run()
571 test_ctx.nrecvd, test_ctx.nsent, MIN_NRECV); in test_run()
575 if (test_ctx.test_pkts[i].lost != 0) { in test_run()
578 calc_rtt(&test_ctx.test_pkts[i], &rtt); in test_run()
588 teardown_udp(&test_ctx); in test_run()