/* A test case definition. Test functions must print failures to stderr and * terminate with exit(EXIT_FAILURE).
*/ struct test_case { constchar *name; /* human-readable name */
/* Called when test mode is TEST_MODE_CLIENT */ void (*run_client)(conststruct test_opts *opts);
/* Called when test mode is TEST_MODE_SERVER */ void (*run_server)(conststruct test_opts *opts);
bool skip;
};
void init_signals(void); unsignedint parse_cid(constchar *str); unsignedint parse_port(constchar *str); int vsock_connect_fd(int fd, unsignedint cid, unsignedint port); int vsock_connect(unsignedint cid, unsignedint port, int type); int vsock_accept(unsignedint cid, unsignedint port, struct sockaddr_vm *clientaddrp, int type); int vsock_stream_connect(unsignedint cid, unsignedint port); int vsock_bind_try(unsignedint cid, unsignedint port, int type); int vsock_bind(unsignedint cid, unsignedint port, int type); int vsock_bind_connect(unsignedint cid, unsignedint port, unsignedint bind_port, int type); int vsock_seqpacket_connect(unsignedint cid, unsignedint port); int vsock_stream_accept(unsignedint cid, unsignedint port, struct sockaddr_vm *clientaddrp); int vsock_stream_listen(unsignedint cid, unsignedint port); int vsock_seqpacket_accept(unsignedint cid, unsignedint port, struct sockaddr_vm *clientaddrp); void vsock_wait_remote_close(int fd); bool vsock_ioctl_int(int fd, unsignedlong op, int expected); bool vsock_wait_sent(int fd); void send_buf(int fd, constvoid *buf, size_t len, int flags,
ssize_t expected_ret); void recv_buf(int fd, void *buf, size_t len, int flags, ssize_t expected_ret); void send_byte(int fd, int expected_ret, int flags); void recv_byte(int fd, int expected_ret, int flags); void run_tests(conststruct test_case *test_cases, conststruct test_opts *opts); void list_tests(conststruct test_case *test_cases); void skip_test(struct test_case *test_cases, size_t test_cases_len, constchar *test_id_str); void pick_test(struct test_case *test_cases, size_t test_cases_len, constchar *test_id_str); unsignedlong hash_djb2(constvoid *data, size_t len);
size_t iovec_bytes(conststruct iovec *iov, size_t iovnum); unsignedlong iovec_hash_djb2(conststruct iovec *iov, size_t iovnum); struct iovec *alloc_test_iovec(conststruct iovec *test_iovec, int iovnum); void free_test_iovec(conststruct iovec *test_iovec, struct iovec *iovec, int iovnum); void setsockopt_ull_check(int fd, int level, int optname, unsignedlonglong val, charconst *errmsg); void setsockopt_int_check(int fd, int level, int optname, int val, charconst *errmsg); void setsockopt_timeval_check(int fd, int level, int optname, struct timeval val, charconst *errmsg); void enable_so_zerocopy_check(int fd); void enable_so_linger(int fd, int timeout); int get_transports(void); #endif/* UTIL_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.