regression tests: Properly handle adnshost et al exit status
[adns] / regress / harness.h
CommitLineData
f9476535 1#ifndef HARNESS_H_INCLUDED
2#define HARNESS_H_INCLUDED
3#include "internal.h"
4#include "hsyscalls.h"
5/* There is a Q function (Q for Question) for each such syscall;
6 * it constructs a string representing the call, and calls Q_str
7 * on it, or constructs it in vb and calls Q_vb;
8 */
9void Qselect( int max , const fd_set *rfds , const fd_set *wfds , const fd_set *efds , struct timeval *to );
10#ifdef HAVE_POLL
11void Qpoll( const struct pollfd *fds , int nfds , int timeout );
12#endif
5c6cd9e0 13void Qsocket( int domain , int type );
f9476535 14void Qfcntl( int fd , int cmd , long arg );
15void Qconnect( int fd , const struct sockaddr *addr , int addrlen );
87dd6345 16void Qbind( int fd , const struct sockaddr *addr , int addrlen );
17void Qlisten( int fd , int backlog );
f9476535 18void Qclose( int fd );
19void Qsendto( int fd , const void *msg , int msglen , const struct sockaddr *addr , int addrlen );
20void Qrecvfrom( int fd , int buflen , int addrlen );
21void Qread( int fd , size_t buflen );
22void Qwrite( int fd , const void *buf , size_t len );
23void Q_vb(void);
24extern void Tshutdown(void);
25/* General help functions */
26void Tfailed(const char *why);
27void Toutputerr(void);
28void Tnomem(void);
29void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2);
87dd6345 30void Tensurerecordfile(void);
f9476535 31void Tmust(const char *call, const char *arg, int cond);
32void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2);
33void Tvbvf(const char *fmt, va_list al);
34void Tvbfdset(int max, const fd_set *set);
35void Tvbpollfds(const struct pollfd *fds, int nfds);
36void Tvbaddr(const struct sockaddr *addr, int addrlen);
37void Tvbbytes(const void *buf, int len);
38void Tvberrno(int e);
39void Tvba(const char *str);
40/* Shared globals */
41extern vbuf vb;
42extern struct timeval currenttime;
43extern const struct Terrno { const char *n; int v; } Terrnos[];
e7308d26
IJ
44/* Special cases */
45void Texit(int rv) NONRETURNING;
f9476535 46#endif