2 m4_dnl (part of complex test harness, not of the library)
3 m4_dnl - function and other declarations
5 m4_dnl This file is part of adns, which is Copyright Ian Jackson
6 m4_dnl and contributors (see the file INSTALL for full details).
8 m4_dnl This program is free software; you can redistribute it and/or modify
9 m4_dnl it under the terms of the GNU General Public License as published by
10 m4_dnl the Free Software Foundation; either version 3, or (at your option)
11 m4_dnl any later version.
13 m4_dnl This program is distributed in the hope that it will be useful,
14 m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 m4_dnl GNU General Public License for more details.
18 m4_dnl You should have received a copy of the GNU General Public License
19 m4_dnl along with this program; if not, write to the Free Software Foundation.
21 m4_include(hmacros.i4)
23 #ifndef HARNESS_H_INCLUDED
24 #define HARNESS_H_INCLUDED
27 #include "hsyscalls.h"
29 /* There is a Q function (Q for Question) for each such syscall;
30 * it constructs a string representing the call, and calls Q_str
31 * on it, or constructs it in vb and calls Q_vb;
35 m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));')
36 m4_define(`hm_specsyscall', `')
37 m4_include(`hsyscalls.i4')
42 extern void Tshutdown(void);
44 /* General help functions */
46 void Tfailed(const char *why);
47 void Toutputerr(void);
49 void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2);
50 void Tensuresetup(void);
51 void Tmust(const char *call, const char *arg, int cond);
53 void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2);
54 void Tvbvf(const char *fmt, va_list al);
55 void Tvbfdset(int max, const fd_set *set);
56 void Tvbpollfds(const struct pollfd *fds, int nfds);
57 void Tvbaddr(const struct sockaddr *addr, int addrlen);
58 void Tvbbytes(const void *buf, int len);
60 void Tvba(const char *str);
65 extern struct timeval currenttime;
66 extern const struct Terrno { const char *n; int v; } Terrnos[];
67 extern const int Tnerrnos;
71 void Texit(int rv) NONRETURNING;
73 void Tcommonshutdown(void);
74 void Tmallocshutdown(void);
75 int Ttestinputfd(void);
76 void T_gettimeofday_hook(void);