source: squid-ssl/trunk/fuentes/test-suite/stub_tools.cc @ 5496

Last change on this file since 5496 was 5496, checked in by Juanma, 22 months ago

Initial release

File size: 2.6 KB
Line 
1/*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10// XXX: need src/ to avoid clashes with ip/tools.h in testIpAddress
11#include "src/tools.h"
12
13#define STUB_API "tools.cc"
14#include "tests/STUB.h"
15
16int DebugSignal = -1;
17SBuf service_name(APP_SHORTNAME);
18void releaseServerSockets(void) STUB
19char * dead_msg(void) STUB_RETVAL(NULL)
20void mail_warranty(void) STUB
21void dumpMallocStats(void) STUB
22void squid_getrusage(struct rusage *r) STUB
23double rusage_cputime(struct rusage *r) STUB_RETVAL(0)
24int rusage_maxrss(struct rusage *r) STUB_RETVAL(0)
25int rusage_pagefaults(struct rusage *r) STUB_RETVAL(0)
26void PrintRusage(void) STUB
27void death(int sig) STUB
28void BroadcastSignalIfAny(int& sig) STUB
29void sigusr2_handle(int sig) STUB
30void debug_trap(const char *message) STUB
31void sig_child(int sig) STUB
32void sig_shutdown(int sig) STUB
33const char * getMyHostname(void) STUB_RETVAL(NULL)
34const char * uniqueHostname(void) STUB_RETVAL(NULL)
35void leave_suid(void) STUB
36void enter_suid(void) STUB
37void no_suid(void) STUB
38
39bool
40IamMasterProcess()
41{
42    //std::cerr << STUB_API << " IamMasterProcess() Not implemented\n";
43    // Since most tests run as a single process, this is the best default.
44    // TODO: If some test case uses multiple processes and cares about
45    // its role, we may need to parameterize or remove this stub.
46    return true;
47}
48
49bool
50IamWorkerProcess()
51{
52    //std::cerr << STUB_API << " IamWorkerProcess() Not implemented\n";
53    return true;
54}
55
56bool IamDiskProcess() STUB_RETVAL_NOP(false)
57bool InDaemonMode() STUB_RETVAL_NOP(false)
58bool UsingSmp() STUB_RETVAL_NOP(false)
59bool IamCoordinatorProcess() STUB_RETVAL(false)
60bool IamPrimaryProcess() STUB_RETVAL(false)
61int NumberOfKids() STUB_RETVAL(0)
62
63//not yet needed in the Stub, causes dependency on String
64//String ProcessRoles() STUB_RETVAL(String())
65void writePidFile(void) STUB
66pid_t readPidFile(void) STUB_RETVAL(0)
67void setMaxFD(void) STUB
68void setSystemLimits(void) STUB
69void squid_signal(int sig, SIGHDLR * func, int flags) STUB
70void logsFlush(void) STUB
71void kb_incr(kb_t * k, size_t v) STUB
72void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm) STUB
73void parseEtcHosts(void) STUB
74int getMyPort(void) STUB_RETVAL(0)
75void setUmask(mode_t mask) STUB
76void strwordquote(MemBuf * mb, const char *str) STUB
77void keepCapabilities(void) STUB
78void restoreCapabilities(bool keep) STUB
79
Note: See TracBrowser for help on using the repository browser.