------------------------------------------------------------ revno: 13111 [merge] revision-id: kinkie@squid-cache.org-20131106165823-cr5v6lv8z1jim0bu parent: squid3@treenet.co.nz-20131103085242-mrrr5zaidj4vlzi9 parent: kinkie@squid-cache.org-20131106102013-65lwyv1whtcw1mvx committer: Francesco Chemolli branch nick: trunk timestamp: Wed 2013-11-06 17:58:23 +0100 message: Merge from staging branch: prepare and use more stubs in the unit tests ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: kinkie@squid-cache.org-20131106165823-cr5v6lv8z1jim0bu # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 120df3883b1e5e3e05235ea1eda20f44f25793da # timestamp: 2013-11-06 17:58:19 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20131103085242-\ # mrrr5zaidj4vlzi9 # # Begin patch === modified file 'src/Makefile.am' --- src/Makefile.am 2013-10-31 07:59:44 +0000 +++ src/Makefile.am 2013-11-06 10:20:13 +0000 @@ -24,6 +24,21 @@ SBufExceptions.h \ SBufExceptions.cc +STOREMETA_SOURCE = \ + StoreMeta.cc \ + StoreMeta.h \ + StoreMetaMD5.cc \ + StoreMetaMD5.h \ + StoreMetaSTD.cc \ + StoreMetaSTD.h \ + StoreMetaSTDLFS.cc \ + StoreMetaSTDLFS.h \ + StoreMetaObjSize.h \ + StoreMetaURL.cc \ + StoreMetaURL.h \ + StoreMetaVary.cc \ + StoreMetaVary.h + LOADABLE_MODULES_SOURCES = \ LoadableModule.h \ LoadableModule.cc \ @@ -509,21 +524,9 @@ store_swapin.cc \ store_swapmeta.cc \ store_swapout.cc \ - StoreMeta.cc \ - StoreMeta.h \ - StoreMetaMD5.cc \ - StoreMetaMD5.h \ - StoreMetaSTD.cc \ - StoreMetaSTD.h \ - StoreMetaSTDLFS.cc \ - StoreMetaSTDLFS.h \ - StoreMetaObjSize.h \ StoreMetaUnpacker.cc \ StoreMetaUnpacker.h \ - StoreMetaURL.cc \ - StoreMetaURL.h \ - StoreMetaVary.cc \ - StoreMetaVary.h \ + $(STOREMETA_SOURCE) \ StoreSearch.h \ StoreStats.cc \ StoreStats.h \ @@ -724,16 +727,11 @@ Parsing.h \ store_key_md5.h \ store_key_md5.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ String.cc \ SquidNew.cc \ - time.cc \ + tests/stub_time.cc \ ufsdump.cc \ dlink.h \ dlink.cc \ @@ -1115,7 +1113,7 @@ cbdata.cc \ cbdata.h \ ConfigParser.cc \ - ETag.cc \ + tests/stub_ETag.cc \ fatal.h \ tests/stub_fatal.cc \ HttpBody.h \ @@ -1183,7 +1181,7 @@ tests/testHttpReply.cc \ tests/testHttpReply.h \ tests/testMain.cc \ - time.cc \ + tests/stub_time.cc \ url.cc \ URLScheme.cc \ wordlist.h \ @@ -1217,7 +1215,7 @@ ConfigParser.cc \ DiskIO/ReadRequest.cc \ DiskIO/WriteRequest.cc \ - ETag.cc \ + tests/stub_ETag.cc \ event.cc \ fatal.h \ tests/stub_fatal.cc \ @@ -1263,19 +1261,14 @@ String.cc \ store_dir.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ store_key_md5.h \ store_key_md5.cc \ swap_log_op.cc \ swap_log_op.h \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ SwapDir.h \ log/access_log.h \ tests/stub_access_log.cc \ @@ -1315,7 +1308,7 @@ tests/testACLMaxUserIP.cc \ tests/testACLMaxUserIP.h \ tests/testMain.cc \ - time.cc \ + tests/stub_time.cc \ url.cc \ URL.h \ URLScheme.cc \ @@ -1360,7 +1353,7 @@ tests/testBoilerplate.cc \ tests/testMain.cc \ tests/testBoilerplate.h \ - time.cc + tests/stub_time.cc nodist_tests_testBoilerplate_SOURCES = \ $(TESTSOURCES) tests_testBoilerplate_LDADD= \ @@ -1401,9 +1394,9 @@ RefreshPattern.h \ cache_cf.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -1428,7 +1421,7 @@ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ event.cc \ external_acl.cc \ ExternalACLEntry.cc \ @@ -1535,7 +1528,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_io.cc \ store_key_md5.h \ @@ -1550,18 +1543,13 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ tools.h \ tools.cc \ - tunnel.cc \ - SwapDir.cc \ + tests/stub_tunnel.cc \ + tests/stub_SwapDir.cc \ MemStore.cc \ $(UNLINKDSOURCE) \ url.cc \ @@ -1569,9 +1557,9 @@ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ FadingCounter.cc \ $(WIN32_SOURCE) \ wordlist.h \ @@ -1622,7 +1610,7 @@ tests_testDiskIO_SOURCES = \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ cbdata.cc \ client_db.h \ ClientInfo.h \ @@ -1632,7 +1620,7 @@ $(DISKIO_SOURCE) \ disk.h \ disk.cc \ - ETag.cc \ + tests/stub_ETag.cc \ EventLoop.cc \ event.cc \ fatal.h \ @@ -1688,13 +1676,8 @@ stmem.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ store_dir.cc \ store_io.cc \ @@ -1707,7 +1690,7 @@ String.cc \ StrList.h \ StrList.cc \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ log/access_log.h \ tests/stub_access_log.cc \ tests/stub_acl.cc \ @@ -1749,7 +1732,7 @@ tests/testMain.cc \ tests/testStoreSupport.cc \ tests/testStoreSupport.h \ - time.cc \ + tests/stub_time.cc \ $(UNLINKDSOURCE) \ url.cc \ URLScheme.cc \ @@ -1806,7 +1789,7 @@ AccessLogEntry.cc \ BodyPipe.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ cache_cf.h \ AuthReg.h \ YesNoNone.h \ @@ -1815,7 +1798,7 @@ cache_cf.cc \ cache_manager.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -1841,7 +1824,7 @@ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ event.cc \ EventLoop.h \ EventLoop.cc \ @@ -1956,7 +1939,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_io.cc \ store_key_md5.h \ @@ -1971,16 +1954,11 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ String.cc \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ tests/CapturingStoreEntry.h \ tests/testEvent.cc \ tests/testEvent.h \ @@ -1994,7 +1972,7 @@ time.cc \ tools.h \ tools.cc \ - tunnel.cc \ + tests/stub_tunnel.cc \ MemStore.cc \ $(UNLINKDSOURCE) \ url.cc \ @@ -2002,9 +1980,9 @@ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc @@ -2055,7 +2033,7 @@ AccessLogEntry.cc \ BodyPipe.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ cache_manager.cc \ cache_cf.h \ AuthReg.h \ @@ -2064,7 +2042,7 @@ RefreshPattern.h \ cache_cf.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -2090,7 +2068,7 @@ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ EventLoop.h \ EventLoop.cc \ event.cc \ @@ -2204,7 +2182,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_io.cc \ store_key_md5.h \ @@ -2219,18 +2197,13 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ String.cc \ StrList.h \ StrList.cc \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ tests/testEventLoop.cc \ tests/testEventLoop.h \ tests/testMain.cc \ @@ -2243,7 +2216,7 @@ time.cc \ tools.h \ tools.cc \ - tunnel.cc \ + tests/stub_tunnel.cc \ MemStore.cc \ $(UNLINKDSOURCE) \ url.cc \ @@ -2251,9 +2224,9 @@ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc @@ -2310,9 +2283,9 @@ cache_cf.cc \ cache_manager.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -2338,7 +2311,7 @@ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ event.cc \ FadingCounter.cc \ fatal.h \ @@ -2448,7 +2421,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_key_md5.h \ store_key_md5.cc \ @@ -2463,18 +2436,13 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ String.cc \ StrList.h \ StrList.cc \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ tests/test_http_range.cc \ tests/stub_external_acl.cc \ tests/stub_ipc_Forwarder.cc \ @@ -2485,16 +2453,16 @@ time.cc \ tools.h \ tools.cc \ - tunnel.cc \ + tests/stub_tunnel.cc \ $(UNLINKDSOURCE) \ url.cc \ URLScheme.cc \ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc @@ -2560,7 +2528,7 @@ tests/testHttpParser.cc \ tests/testHttpParser.h \ tests/testMain.cc \ - time.cc \ + tests/stub_time.cc \ wordlist.h \ wordlist.cc nodist_tests_testHttpParser_SOURCES = \ @@ -2612,9 +2580,9 @@ cache_cf.cc \ debug.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -2638,7 +2606,7 @@ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ external_acl.cc \ ExternalACLEntry.cc \ fatal.h \ @@ -2738,7 +2706,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_io.cc \ store_key_md5.h \ @@ -2753,30 +2721,25 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ StrList.h \ StrList.cc \ event.cc \ tools.h \ tools.cc \ - tunnel.cc \ - SwapDir.cc \ + tests/stub_tunnel.cc \ + tests/stub_SwapDir.cc \ MemStore.cc \ url.cc \ URLScheme.cc \ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ FadingCounter.cc \ $(WIN32_SOURCE) \ wordlist.h \ @@ -2825,7 +2788,7 @@ ## first line - what we are testing. tests_testStore_SOURCES= \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ cbdata.cc \ ClientInfo.h \ ConfigOption.cc \ @@ -2888,13 +2851,8 @@ store_io.cc \ store_swapout.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ store_key_md5.h \ store_key_md5.cc \ @@ -2954,7 +2912,7 @@ tests/testStoreSupport.h \ tests/TestSwapDir.cc \ tests/TestSwapDir.h \ - time.cc \ + tests/stub_time.cc \ url.cc \ URLScheme.cc \ wordlist.h \ @@ -3014,7 +2972,7 @@ tests/stub_HelperChildConfig.cc \ tools.h \ tests/stub_tools.cc \ - time.cc \ + tests/stub_time.cc \ wordlist.h \ wordlist.cc nodist_tests_testString_SOURCES = \ @@ -3096,13 +3054,8 @@ Notes.cc \ StoreSwapLogData.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ + $(STOREMETA_SOURCE) \ StoreFileSystem.cc \ store_io.cc \ store_swapout.cc \ @@ -3112,7 +3065,7 @@ event.cc \ $(DELAY_POOL_SOURCE) \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ ConfigParser.cc \ EventLoop.cc \ HttpMsg.cc \ @@ -3242,7 +3195,7 @@ tests_testRock_SOURCES = \ cbdata.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ ConfigOption.cc \ ConfigParser.cc \ disk.h \ @@ -3301,13 +3254,8 @@ store.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ - StoreMetaURL.cc \ StoreMetaUnpacker.cc \ - StoreMetaVary.cc \ + $(STOREMETA_SOURCE) \ StoreSwapLogData.cc \ store_dir.cc \ store_io.cc \ @@ -3411,11 +3359,11 @@ YesNoNone.cc \ RefreshPattern.h \ cache_cf.cc \ - cache_manager.cc \ + tests/stub_cache_manager.cc \ CacheDigest.h \ - CacheDigest.cc \ + tests/stub_CacheDigest.cc \ carp.h \ - carp.cc \ + tests/stub_carp.cc \ cbdata.cc \ ChunkedCodingParser.cc \ client_db.h \ @@ -3551,7 +3499,7 @@ store.cc \ store_client.cc \ store_digest.h \ - store_digest.cc \ + tests/stub_store_digest.cc \ store_dir.cc \ store_io.cc \ store_key_md5.h \ @@ -3566,18 +3514,13 @@ store_swapout.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - StoreMeta.cc \ - StoreMetaMD5.cc \ - StoreMetaSTD.cc \ - StoreMetaSTDLFS.cc \ + tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ - StoreMetaURL.cc \ - StoreMetaVary.cc \ StoreSwapLogData.cc \ String.cc \ StrList.h \ StrList.cc \ - SwapDir.cc \ + tests/stub_SwapDir.cc \ MemStore.cc \ tests/stub_debug.cc \ tests/stub_DiskIOModule.cc \ @@ -3591,18 +3534,18 @@ tests/testURLScheme.cc \ tests/testURLScheme.h \ tests/testMain.cc \ - time.cc \ + tests/stub_time.cc \ tools.h \ tools.cc \ - tunnel.cc \ + tests/stub_tunnel.cc \ url.cc \ URLScheme.cc \ urn.h \ urn.cc \ wccp2.h \ - wccp2.cc \ + tests/stub_wccp2.cc \ whois.h \ - whois.cc \ + tests/stub_whois.cc \ FadingCounter.cc \ $(WIN32_SOURCE) \ wordlist.h \ === modified file 'src/tests/Stub.list' --- src/tests/Stub.list 2013-11-01 00:15:11 +0000 +++ src/tests/Stub.list 2013-11-05 22:04:30 +0000 @@ -1,4 +1,5 @@ STUB_SOURCE= tests/STUB.h \ + tests/stub_CacheDigest.cc \ tests/stub_CommIO.cc \ tests/stub_DelayId.cc \ tests/stub_DiskIOModule.cc \ @@ -21,6 +22,7 @@ tests/stub_client_side_request.cc \ tests/stub_comm.cc \ tests/stub_debug.cc \ + tests/stub_ETag.cc \ tests/stub_errorpage.cc \ tests/stub_event.cc \ tests/stub_external_acl.cc \ @@ -49,12 +51,18 @@ tests/stub_pconn.cc \ tests/stub_redirect.cc \ tests/stub_stat.cc \ + tests/stub_SwapDir.cc \ tests/stub_stmem.cc \ tests/stub_store.cc \ + tests/stub_StoreMeta.cc \ tests/stub_store_client.cc \ + tests/stub_store_digest.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ tests/stub_store_swapout.cc \ tests/stub_time.cc \ tests/stub_tools.cc \ + tests/stub_tunnel.cc \ + tests/stub_wccp2.cc \ + tests/stub_whois.cc \ tests/stub_wordlist.cc === added file 'src/tests/stub_CacheDigest.cc' --- src/tests/stub_CacheDigest.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_CacheDigest.cc 2013-11-05 09:48:30 +0000 @@ -0,0 +1,25 @@ +#include "squid.h" +#include "typedefs.h" /* for cache_key */ + +#define STUB_API "CacheDigest.cc" +#include "tests/STUB.h" + +class CacheDigest; +class CacheDigestGuessStats; +class StoreEntry; + +CacheDigest * cacheDigestCreate(int, int) STUB_RETVAL(NULL) +void cacheDigestDestroy(CacheDigest *) STUB +CacheDigest * cacheDigestClone(const CacheDigest *) STUB_RETVAL(NULL) +void cacheDigestClear(CacheDigest * ) STUB +void cacheDigestChangeCap(CacheDigest *,int) STUB +int cacheDigestTest(const CacheDigest *, const cache_key *) STUB_RETVAL(1) +void cacheDigestAdd(CacheDigest *, const cache_key *) STUB +void cacheDigestDel(CacheDigest *, const cache_key *) STUB +int cacheDigestBitUtil(const CacheDigest *) STUB_RETVAL(0) +void cacheDigestGuessStatsUpdate(CacheDigestGuessStats *, int, int) STUB +void cacheDigestGuessStatsReport(const CacheDigestGuessStats *, StoreEntry *, const char *) STUB +void cacheDigestReport(CacheDigest *, const char *, StoreEntry *) STUB +size_t cacheDigestCalcMaskSize(int, int) STUB_RETVAL(1) + + === added file 'src/tests/stub_ETag.cc' --- src/tests/stub_ETag.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_ETag.cc 2013-11-05 05:59:08 +0000 @@ -0,0 +1,11 @@ +#include "squid.h" +#include "ETag.h" + +#define STUB_API "ETag.cc" +#include "tests/STUB.h" + +int etagParseInit(ETag * , const char *) STUB_RETVAL(0) +bool etagIsStrongEqual(const ETag &, const ETag &) STUB_RETVAL(false) +bool etagIsWeakEqual(const ETag &, const ETag &) STUB_RETVAL(false) + + === added file 'src/tests/stub_StoreMeta.cc' --- src/tests/stub_StoreMeta.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_StoreMeta.cc 2013-11-05 22:04:30 +0000 @@ -0,0 +1,14 @@ +#include "squid.h" + +#define STUB_API "StoreMeta.cc" +#include "tests/STUB.h" + +#include "StoreMeta.h" + +bool StoreMeta::validType(char) STUB_RETVAL(false) +bool StoreMeta::validLength(int) const STUB_RETVAL(false) +StoreMeta * StoreMeta::Factory (char, size_t, void const *) STUB_RETVAL(NULL) +void StoreMeta::FreeList(StoreMeta **) STUB +StoreMeta ** StoreMeta::Add(StoreMeta **, StoreMeta *) STUB_RETVAL(NULL) +bool StoreMeta::checkConsistency(StoreEntry *) const STUB_RETVAL(false) + === added file 'src/tests/stub_SwapDir.cc' --- src/tests/stub_SwapDir.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_SwapDir.cc 2013-11-06 09:54:51 +0000 @@ -0,0 +1,43 @@ +#include "squid.h" +#include "SwapDir.h" + +#define STUB_API "SwapDir.cc" +#include "tests/STUB.h" + +// SwapDir::SwapDir(char const *) STUB +// SwapDir::~SwapDir() STUB +void SwapDir::create() STUB +void SwapDir::dump(StoreEntry &) const STUB +bool SwapDir::doubleCheck(StoreEntry &) STUB_RETVAL(false) +void SwapDir::unlink(StoreEntry &) STUB +void SwapDir::getStats(StoreInfoStats &) const STUB +void SwapDir::stat(StoreEntry &) const STUB +void SwapDir::statfs(StoreEntry &)const STUB +void SwapDir::maintain() STUB +uint64_t SwapDir::minSize() const STUB_RETVAL(0) +int64_t SwapDir::maxObjectSize() const STUB_RETVAL(0) +void SwapDir::maxObjectSize(int64_t) STUB +void SwapDir::reference(StoreEntry &) STUB +bool SwapDir::dereference(StoreEntry &, bool) STUB_RETVAL(false) +int SwapDir::callback() STUB_RETVAL(0) +bool SwapDir::canStore(const StoreEntry &, int64_t, int &) const STUB_RETVAL(false) +bool SwapDir::canLog(StoreEntry const &)const STUB_RETVAL(false) +void SwapDir::sync() STUB +void SwapDir::openLog() STUB +void SwapDir::closeLog() STUB +int SwapDir::writeCleanStart() STUB_RETVAL(0) +void SwapDir::writeCleanDone() STUB +void SwapDir::logEntry(const StoreEntry &, int) const STUB +char const * SwapDir::type() const STUB_RETVAL("stub") +bool SwapDir::active() const STUB_RETVAL(false) +bool SwapDir::needsDiskStrand() const STUB_RETVAL(false) +ConfigOption * SwapDir::getOptionTree() const STUB_RETVAL(NULL) +void SwapDir::parseOptions(int) STUB +void SwapDir::dumpOptions(StoreEntry *) const STUB +bool SwapDir::optionReadOnlyParse(char const *, const char *, int) STUB_RETVAL(false) +void SwapDir::optionReadOnlyDump(StoreEntry *) const STUB +bool SwapDir::optionObjectSizeParse(char const *, const char *, int) STUB_RETVAL(false) +void SwapDir::optionObjectSizeDump(StoreEntry *) const STUB +StoreEntry * SwapDir::get(const cache_key *) STUB_RETVAL(NULL) +void SwapDir::get(String const, STOREGETCLIENT , void *) STUB + === modified file 'src/tests/stub_cache_manager.cc' --- src/tests/stub_cache_manager.cc 2012-08-14 11:53:07 +0000 +++ src/tests/stub_cache_manager.cc 2013-11-05 10:23:49 +0000 @@ -16,3 +16,5 @@ CacheManager* CacheManager::GetInstance() STUB_RETVAL(instance) void Mgr::RegisterAction(char const*, char const*, OBJH, int, int) {} void Mgr::RegisterAction(char const *, char const *, Mgr::ClassActionCreationHandler *, int, int) {} + +Mgr::Action::Pointer CacheManager::createRequestedAction(const Mgr::ActionParams &) STUB_RETVAL(NULL) === added file 'src/tests/stub_carp.cc' --- src/tests/stub_carp.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_carp.cc 2013-11-05 21:19:03 +0000 @@ -0,0 +1,11 @@ +#include "squid.h" + +#define STUB_API "carp.cc" +#include "tests/STUB.h" + +class CachePeer; +class HttpRequest; + +void carpInit(void) STUB +CachePeer * carpSelectParent(HttpRequest *) STUB_RETVAL(NULL) + === modified file 'src/tests/stub_libauth.cc' --- src/tests/stub_libauth.cc 2013-10-28 13:16:06 +0000 +++ src/tests/stub_libauth.cc 2013-11-05 06:26:39 +0000 @@ -5,30 +5,31 @@ #if USE_AUTH #include "auth/Config.h" -Auth::UserRequest::Pointer Auth::Config::CreateAuthUser(const char *) STUB -Auth::Config * Auth::Config::Find(const char *) STUB +Auth::UserRequest::Pointer Auth::Config::CreateAuthUser(const char *) STUB_RETVAL(NULL) +Auth::Config * Auth::Config::Find(const char *) STUB_RETVAL(NULL) void Auth::Config::registerWithCacheManager(void) STUB_NOP Auth::ConfigVector Auth::TheConfig; #include "auth/Gadgets.h" -int authenticateActiveSchemeCount(void) STUB -int authenticateSchemeCount(void) STUB +int authenticateActiveSchemeCount(void) STUB_RETVAL(0) +int authenticateSchemeCount(void) STUB_RETVAL(0) void authenticateInit(Auth::ConfigVector *) STUB void authenticateRotate(void) STUB void authenticateReset(void) STUB AuthUserHashPointer::AuthUserHashPointer(Auth::User::Pointer anAuth_user) STUB -Auth::User::Pointer AuthUserHashPointer::user() const STUB +Auth::User::Pointer AuthUserHashPointer::user() const STUB_RETVAL(NULL) #include "auth/Scheme.h" +Vector *Auth::Scheme::_Schemes = NULL; void Auth::Scheme::AddScheme(Auth::Scheme::Pointer) STUB -Auth::Scheme::Pointer Auth::Scheme::Find(const char *) STUB -Vector & Auth::Scheme::GetSchemes() STUB +Auth::Scheme::Pointer Auth::Scheme::Find(const char *) STUB_RETVAL(NULL) +Vector & Auth::Scheme::GetSchemes() STUB_RETVAL(*_Schemes); void Auth::Scheme::FreeAll() STUB #include "auth/User.h" Auth::User::User(Auth::Config *) STUB -Auth::CredentialState Auth::User::credentials() const STUB +Auth::CredentialState Auth::User::credentials() const STUB_RETVAL(credentials_state) void Auth::User::credentials(CredentialState) STUB void Auth::User::absorb(Auth::User::Pointer) STUB Auth::User::~User() STUB_NOP @@ -44,8 +45,8 @@ #include "auth/UserRequest.h" char const * Auth::UserRequest::username() const STUB_RETVAL("stub_username") void Auth::UserRequest::start(AUTHCB *, void *) STUB -bool Auth::UserRequest::valid() const STUB -void * Auth::UserRequest::operator new (size_t) STUB +bool Auth::UserRequest::valid() const STUB_RETVAL(false) +void * Auth::UserRequest::operator new (size_t) STUB_RETVAL((void *)1) void Auth::UserRequest::operator delete (void *) STUB Auth::UserRequest::UserRequest() STUB Auth::UserRequest::~UserRequest() STUB @@ -54,19 +55,19 @@ char const * Auth::UserRequest::denyMessage(char const * const) STUB_RETVAL("stub") void authenticateAuthUserRequestRemoveIp(Auth::UserRequest::Pointer, Ip::Address const &) STUB void authenticateAuthUserRequestClearIp(Auth::UserRequest::Pointer) STUB -int authenticateAuthUserRequestIPCount(Auth::UserRequest::Pointer) STUB -int authenticateUserAuthenticated(Auth::UserRequest::Pointer) STUB -Auth::Direction Auth::UserRequest::direction() STUB +int authenticateAuthUserRequestIPCount(Auth::UserRequest::Pointer) STUB_RETVAL(0) +int authenticateUserAuthenticated(Auth::UserRequest::Pointer) STUB_RETVAL(0) +Auth::Direction Auth::UserRequest::direction() STUB_RETVAL(Auth::CRED_ERROR) void Auth::UserRequest::addAuthenticationInfoHeader(HttpReply *, int) STUB void Auth::UserRequest::addAuthenticationInfoTrailer(HttpReply *, int) STUB void Auth::UserRequest::releaseAuthServer() STUB -const char * Auth::UserRequest::connLastHeader() STUB -AuthAclState Auth::UserRequest::authenticate(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &) STUB -AuthAclState Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &) STUB +const char * Auth::UserRequest::connLastHeader() STUB_RETVAL("stub") +AuthAclState Auth::UserRequest::authenticate(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &) STUB_RETVAL(AUTH_AUTHENTICATED) +AuthAclState Auth::UserRequest::tryToAuthenticateAndSetAuthUser(Auth::UserRequest::Pointer *, http_hdr_type, HttpRequest *, ConnStateData *, Ip::Address &) STUB_RETVAL(AUTH_AUTHENTICATED) void Auth::UserRequest::addReplyAuthHeader(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int, int) STUB void authenticateFixHeader(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int, int) STUB void authenticateAddTrailer(HttpReply *, Auth::UserRequest::Pointer, HttpRequest *, int) STUB -Auth::Scheme::Pointer Auth::UserRequest::scheme() const STUB +Auth::Scheme::Pointer Auth::UserRequest::scheme() const STUB_RETVAL(NULL) #include "AuthReg.h" void Auth::Init() STUB_NOP === modified file 'src/tests/stub_mem.cc' --- src/tests/stub_mem.cc 2013-10-25 00:13:46 +0000 +++ src/tests/stub_mem.cc 2013-11-05 10:03:27 +0000 @@ -61,3 +61,5 @@ void * memAllocate(mem_type type) STUB_RETVAL(NULL) void memFree(void *p, int type) STUB +void Mem::Init(void) STUB_NOP + === added file 'src/tests/stub_store_digest.cc' --- src/tests/stub_store_digest.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_store_digest.cc 2013-11-05 09:48:30 +0000 @@ -0,0 +1,10 @@ +#include "squid.h" + +#define STUB_API "store_digets.cc" +#include "tests/STUB.h" + +class StoreEntry; +void storeDigestInit(void) STUB +void storeDigestNoteStoreReady(void) STUB +void storeDigestDel(const StoreEntry *) STUB +void storeDigestReport(StoreEntry *) STUB === modified file 'src/tests/stub_time.cc' --- src/tests/stub_time.cc 2013-10-31 15:31:39 +0000 +++ src/tests/stub_time.cc 2013-11-05 14:30:41 +0000 @@ -12,3 +12,7 @@ int tvSubMsec(struct timeval, struct timeval) STUB_RETVAL(0) const char * Time::FormatStrf(time_t ) STUB_RETVAL("") const char * Time::FormatHttpd(time_t ) STUB_RETVAL("") + +void TimeEngine::tick() STUB +TimeEngine::~TimeEngine() STUB + === added file 'src/tests/stub_tunnel.cc' --- src/tests/stub_tunnel.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_tunnel.cc 2013-11-05 22:04:30 +0000 @@ -0,0 +1,10 @@ +#include "squid.h" + +#define STUB_API "tunnel.cc" +#include "tests/STUB.h" + +#include "FwdState.h" +class ClientHttpRequest; + +void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntryPointer &al) STUB + === added file 'src/tests/stub_wccp2.cc' --- src/tests/stub_wccp2.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_wccp2.cc 2013-11-06 09:54:51 +0000 @@ -0,0 +1,28 @@ +#include "squid.h" + +#if USE_WCCPv2 + +#define STUB_API "wccp2.cc" +#include "tests/STUB.h" + +class StoreEntry; + +void wccp2_add_service_list(int, int, int, int, int, int[], int, char *) STUB +void wccp2Init(void) STUB +void wccp2ConnectionOpen(void) STUB +void wccp2ConnectionClose(void) STUB +void dump_wccp2_method(StoreEntry *, const char *, int) STUB +void free_wccp2_method(int *) STUB +void parse_wccp2_amethod(int *) STUB +void dump_wccp2_amethod(StoreEntry *, const char *, int) STUB +void parse_wccp2_service(void *) STUB +void dump_wccp2_service(StoreEntry *, const char *, void *) STUB +void free_wccp2_service(void *) STUB +int check_null_wccp2_service(void *) STUB_RETVAL(0) +void parse_wccp2_service_info(void *) STUB +void dump_wccp2_service_info(StoreEntry *, const char *, void *) STUB +void free_wccp2_service_info(void *) STUB +void free_wccp2_amethod(int *) STUB +void parse_wccp2_method(int *) STUB + +#endif /* USE_WCCPv2 */ === added file 'src/tests/stub_whois.cc' --- src/tests/stub_whois.cc 1970-01-01 00:00:00 +0000 +++ src/tests/stub_whois.cc 2013-11-05 14:22:49 +0000 @@ -0,0 +1,9 @@ +#include "squid.h" + +#define STUB_API "whois.cc" +#include "tests/STUB.h" + +class FwdState; + +void whoisStart(FwdState *) STUB +