]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_tools.cc
Sync with trunk rev.13542
[thirdparty/squid.git] / src / tests / stub_tools.cc
1 #include "squid.h"
2 // XXX: need src/ to avoid clashes with ip/tools.h in testIpAddress
3 #include "src/tools.h"
4
5 #define STUB_API "tools.cc"
6 #include "tests/STUB.h"
7
8 int DebugSignal = -1;
9 SBuf service_name(APP_SHORTNAME);
10 void releaseServerSockets(void) STUB
11 char * dead_msg(void) STUB_RETVAL(NULL)
12 void mail_warranty(void) STUB
13 void dumpMallocStats(void) STUB
14 void squid_getrusage(struct rusage *r) STUB
15 double rusage_cputime(struct rusage *r) STUB_RETVAL(0)
16 int rusage_maxrss(struct rusage *r) STUB_RETVAL(0)
17 int rusage_pagefaults(struct rusage *r) STUB_RETVAL(0)
18 void PrintRusage(void) STUB
19 void death(int sig) STUB
20 void BroadcastSignalIfAny(int& sig) STUB
21 void sigusr2_handle(int sig) STUB
22 void debug_trap(const char *message) STUB
23 void sig_child(int sig) STUB
24 void sig_shutdown(int sig) STUB
25 const char * getMyHostname(void) STUB_RETVAL(NULL)
26 const char * uniqueHostname(void) STUB_RETVAL(NULL)
27 void leave_suid(void) STUB
28 void enter_suid(void) STUB
29 void no_suid(void) STUB
30
31 bool
32 IamMasterProcess()
33 {
34 //std::cerr << STUB_API << " IamMasterProcess() Not implemented\n";
35 // Since most tests run as a single process, this is the best default.
36 // TODO: If some test case uses multiple processes and cares about
37 // its role, we may need to parameterize or remove this stub.
38 return true;
39 }
40
41 bool
42 IamWorkerProcess()
43 {
44 //std::cerr << STUB_API << " IamWorkerProcess() Not implemented\n";
45 return true;
46 }
47
48 bool IamDiskProcess() STUB_RETVAL_NOP(false)
49 bool InDaemonMode() STUB_RETVAL_NOP(false)
50 bool UsingSmp() STUB_RETVAL_NOP(false)
51 bool IamCoordinatorProcess() STUB_RETVAL(false)
52 bool IamPrimaryProcess() STUB_RETVAL(false)
53 int NumberOfKids() STUB_RETVAL(0)
54
55 //not yet needed in the Stub, causes dependency on String
56 //String ProcessRoles() STUB_RETVAL(String())
57 void writePidFile(void) STUB
58 pid_t readPidFile(void) STUB_RETVAL(0)
59 void setMaxFD(void) STUB
60 void setSystemLimits(void) STUB
61 void squid_signal(int sig, SIGHDLR * func, int flags) STUB
62 void logsFlush(void) STUB
63 void kb_incr(kb_t * k, size_t v) STUB
64 void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm) STUB
65 void parseEtcHosts(void) STUB
66 int getMyPort(void) STUB_RETVAL(0)
67 void setUmask(mode_t mask) STUB
68 void strwordquote(MemBuf * mb, const char *str) STUB
69 void keepCapabilities(void) STUB
70 void restoreCapabilities(int keep) STUB