SquidString.h \
SquidTime.h \
String.cc \
+ tests/stub_cache_cf.cc \
tests/stub_cache_manager.cc \
tests/stub_debug.cc \
tests/stub_HelperChildConfig.cc \
tests/testHttpReply.cc \
tests/testHttpReply.h \
tests/testMain.cc \
- time.cc
+ time.cc \
+ wordlist.cc
nodist_tests_testHttpReply_SOURCES=\
$(TESTSOURCES)
tests_testHttpReply_LDFLAGS = $(LIBADD_DL)
tests/stub_fd.cc \
tests/stub_HttpRequest.cc \
tests/stub_MemObject.cc \
+ tests/stub_MemStore.cc \
tests/stub_mime.cc \
tests/stub_store.cc \
tests/stub_store_rebuild.cc \
tests/stub_store_swapout.cc \
+ tests/stub_tools.cc \
tests/stub_cache_manager.cc \
tests/testACLMaxUserIP.cc \
tests/testACLMaxUserIP.h \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
+ $(DISK_OS_LIBS) \
$(REGEXLIB) \
$(SQUID_CPPUNIT_LIBS) \
$(SSLLIB) \
icmp/libicmp.la icmp/libicmp-core.la \
log/liblog.la \
$(REPL_OBJS) \
+ $(DISK_OS_LIBS) \
$(ADAPTATION_LIBS) \
$(ESI_LIBS) \
$(SSL_LIBS) \
tests/stub_HttpRequest.cc \
tests/stub_http.cc \
tests/stub_internal.cc \
+ tests/stub_MemStore.cc \
tests/stub_mime.cc \
tests/stub_Port.cc \
tests/stub_store_client.cc \
tests/stub_store_rebuild.cc \
tests/stub_tools.cc \
- tests/stub_TypedMsgHdr.cc \
tests/stub_UdsOp.cc \
tests/testDiskIO.cc \
tests/testDiskIO.h \
eui/libeui.la \
acl/libstate.la \
$(AUTH_LIBS) \
- base/libbase.la \
libsquid.la \
ip/libip.la \
fs/libfs.la \
$(DISK_OS_LIBS) \
acl/libapi.la \
mgr/libmgr.la \
+ ipc/libipc.la \
+ base/libbase.la \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
time.cc \
tools.cc \
tunnel.cc \
- SwapDir.cc MemStore.cc \
+ MemStore.cc \
url.cc \
URLScheme.cc \
urn.cc \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
+ $(DISK_OS_LIBS) \
$(REGEXLIB) \
$(SQUID_CPPUNIT_LIBS) \
$(SQUID_CPPUNIT_LA) \
time.cc \
tools.cc \
tunnel.cc \
- SwapDir.cc MemStore.cc \
+ MemStore.cc \
url.cc \
URLScheme.cc \
urn.cc \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
+ $(DISK_OS_LIBS) \
$(REGEXLIB) \
$(SQUID_CPPUNIT_LIBS) \
$(SQUID_CPPUNIT_LA) \
tests/test_http_range.cc \
tests/stub_ipc_Forwarder.cc \
tests/stub_main_cc.cc \
+ tests/stub_MemStore.cc \
time.cc \
tools.cc \
tunnel.cc \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
+ $(DISK_OS_LIBS) \
$(REGEXLIB) \
$(SQUID_CPPUNIT_LIBS) \
$(SQUID_CPPUNIT_LA) \
tests/stub_HttpReply.cc \
tests/stub_HttpRequest.cc \
tests/stub_MemObject.cc \
+ tests/stub_MemStore.cc \
tests/stub_mime.cc \
tests/stub_Port.cc \
tests/stub_store_client.cc \
tests/stub_store_rebuild.cc \
tests/stub_store_swapout.cc \
tests/stub_tools.cc \
- tests/stub_TypedMsgHdr.cc \
tests/stub_UdsOp.cc \
tests/testMain.cc \
tests/testStore.cc \
libsquid.la \
ip/libip.la \
fs/libfs.la \
- ipc/libipc.la \
mgr/libmgr.la \
+ ipc/libipc.la \
anyp/libanyp.la \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
tests_testString_SOURCES = \
ClientInfo.h \
mem.cc \
+ MemBuf.cc \
String.cc \
tests/testMain.cc \
tests/testString.cc \
tests/testString.h \
+ tests/stub_cache_cf.cc \
tests/stub_cache_manager.cc \
tests/stub_debug.cc \
tests/stub_HelperChildConfig.cc \
- time.cc
+ time.cc \
+ wordlist.cc
nodist_tests_testString_SOURCES = \
$(TESTSOURCES)
tests_testString_LDADD = \
tests/testUfs.h \
tests/stub_cache_manager.cc \
tests/stub_HelperChildConfig.cc \
+ tests/stub_MemStore.cc \
tests/stub_Port.cc \
- tests/stub_TypedMsgHdr.cc \
tests/stub_UdsOp.cc \
tests/stub_internal.cc \
tests/stub_CommIO.cc \
acl/libstate.la \
$(AUTH_LIBS) \
acl/libapi.la \
- base/libbase.la \
libsquid.la \
ip/libip.la \
fs/libfs.la \
- ipc/libipc.la \
mgr/libmgr.la \
$(REPL_OBJS) \
$(DISK_LIBS) \
$(DISK_OS_LIBS) \
acl/libapi.la \
+ ipc/libipc.la \
+ base/libbase.la \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
$(SWAP_TEST_DS)
tests_testRock_SOURCES = \
+ cbdata.cc \
+ ConfigOption.cc \
+ ConfigParser.cc \
+ disk.cc \
+ ETag.cc \
+ event.cc \
+ fd.cc \
+ HttpHdrCc.cc \
+ HttpHdrContRange.cc \
+ HttpHdrRange.cc \
+ HttpHdrSc.cc \
+ HttpHdrScTarget.cc \
+ HttpHeader.cc \
+ HttpHeaderTools.cc \
+ HttpMsg.cc \
+ HttpRequestMethod.cc \
+ int.cc \
+ mem.cc \
+ MemBuf.cc \
+ MemObject.cc \
+ mem_node.cc \
+ Packer.cc \
+ Parsing.cc \
+ StatHist.cc \
+ stmem.cc \
+ store.cc \
+ StoreIOState.cc \
+ StoreMeta.cc \
+ StoreMetaMD5.cc \
+ StoreMetaSTD.cc \
+ StoreMetaSTDLFS.cc \
+ StoreMetaURL.cc \
+ StoreMetaUnpacker.cc \
+ StoreMetaVary.cc \
+ store_dir.cc \
+ store_io.cc \
+ store_key_md5.cc \
+ store_swapmeta.cc \
+ store_swapout.cc \
+ String.cc \
+ SwapDir.cc \
tests/testRock.cc \
tests/testMain.cc \
tests/testRock.h \
+ tests/stub_access_log.cc \
+ tests/stub_cache_cf.cc \
tests/stub_cache_manager.cc \
+ tests/stub_comm.cc \
+ tests/stub_CommIO.cc \
+ tests/stub_debug.cc \
+ tests/stub_errorpage.cc \
tests/stub_HelperChildConfig.cc \
+ tests/stub_http.cc \
+ tests/stub_HttpReply.cc \
+ tests/stub_HttpRequest.cc \
+ tests/stub_MemStore.cc \
+ tests/stub_mime.cc \
tests/stub_Port.cc \
- tests/stub_TypedMsgHdr.cc \
+ tests/stub_store_client.cc \
+ tests/stub_tools.cc \
tests/stub_UdsOp.cc \
- $(SWAP_TEST_SOURCES)
+ time.cc \
+ url.cc \
+ URLScheme.cc \
+ wordlist.cc
nodist_tests_testRock_SOURCES = \
swap_log_op.cc \
- $(SWAP_TEST_GEN_SOURCES) \
SquidMath.cc \
- SquidMath.h
+ SquidMath.h \
+ $(TESTSOURCES)
tests_testRock_LDADD = \
+ anyp/libanyp.la \
+ libsquid.la \
+ ip/libip.la \
+ $(AUTH_LIBS) \
$(COMMON_LIBS) \
$(REPL_OBJS) \
$(DISK_LIBS) \
$(DISK_OS_LIBS) \
+ acl/libacls.la \
acl/libapi.la \
+ acl/libstate.la \
+ eui/libeui.la \
+ mgr/libmgr.la \
+ ipc/libipc.la \
+ base/libbase.la \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
cbdata.cc \
String.cc \
tests/stub_comm.cc \
- tests/stub_debug.cc \
tests/stub_client_side_request.cc \
tests/stub_http.cc \
mem_node.cc \
tests/stub_HttpRequest.cc \
tests/stub_access_log.cc \
refresh.cc \
+ tests/stub_MemStore.cc \
+ tests/stub_Port.cc \
tests/stub_store_client.cc \
tests/stub_tools.cc \
+ tests/stub_UdsOp.cc \
tests/testStoreSupport.cc \
tests/testStoreSupport.h \
time.cc \
$(TESTSOURCES) \
$(DISKIO_GEN_SOURCE)
tests_testCoss_LDADD = \
+ anyp/libanyp.la \
libsquid.la \
$(REGEXLIB) \
$(AUTH_ACL_LIBS) \
acl/libstate.la \
$(AUTH_LIBS) \
acl/libapi.la \
- base/libbase.la \
libsquid.la \
ip/libip.la \
fs/libfs.la \
- ipc/libipc.la \
mgr/libmgr.la \
$(REPL_OBJS) \
$(DISK_LIBS) \
$(DISK_OS_LIBS) \
acl/libapi.la \
+ ipc/libipc.la \
+ base/libbase.la \
$(top_builddir)/lib/libmisccontainers.la \
$(top_builddir)/lib/libmiscencoding.la \
$(top_builddir)/lib/libmiscutil.la \
icmp/libicmp.la icmp/libicmp-core.la \
comm/libcomm.la \
log/liblog.la \
+ $(DISK_OS_LIBS) \
$(REGEXLIB) \
$(REPL_OBJS) \
$(ADAPTATION_LIBS) \
#define SQUID_IPC_QUEUE_H
#include "Array.h"
+#include "Debug.h"
#include "base/InstanceId.h"
#include "ipc/AtomicWord.h"
#include "ipc/mem/Pointer.h"
return 3;
}
+uint64_t
+TestSwapDir::currentSize() const
+{
+ return 2;
+}
+
+uint64_t
+TestSwapDir::currentCount() const
+{
+ return 2;
+}
+
void
TestSwapDir::stat(StoreEntry &) const
{
bool statsCalled;
virtual uint64_t maxSize() const;
+ virtual uint64_t currentSize() const;
+ virtual uint64_t currentCount() const;
virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
+ virtual void swappedOut(const StoreEntry &e) {}
virtual void reconfigure(int, char*);
virtual void init();
fatal("Not implemented");
return false;
}
+
+int64_t
+HttpReply::bodySize(const HttpRequestMethod&) const
+{
+ fatal("Not implemented");
+ return 0;
+}
return false;
}
+int64_t
+HttpRequest::getRangeOffsetLimit()
+{
+ fatal("Not implemented");
+ return 0;
+}
+
/*
* DO NOT MODIFY:
* arch-tag: dd894aa8-63cc-4543-92d9-1079a18bee11
fatal ("MemObject.cc required.");
return false;
}
+
+int64_t
+MemObject::expectedReplySize() const
+{
+ fatal ("MemObject.cc required.");
+ return 0;
+}
+
+void
+MemObject::resetUrls(char const*, char const*)
+{
+ fatal ("MemObject.cc required.");
+}
+
+void
+MemObject::markEndOfReplyHeaders()
+{
+ fatal ("MemObject.cc required.");
+}
--- /dev/null
+/*
+ * $Id$
+ *
+ * DEBUG: section 84 Helper process maintenance
+ *
+ */
+
+#include "config.h"
+#include "MemStore.h"
+
+#define STUB_API "MemStore.cc"
+#include "tests/STUB.h"
+
+MemStore::MemStore() STUB
+MemStore::~MemStore() STUB
+void MemStore::considerKeeping(StoreEntry &) STUB
+void MemStore::reference(StoreEntry &) STUB
+void MemStore::maintain() STUB
+void MemStore::cleanReadable(const sfileno) STUB
+void MemStore::get(String const, STOREGETCLIENT, void *) STUB
+void MemStore::init() STUB
+void MemStore::stat(StoreEntry &) const STUB
+
+int MemStore::callback()
+{
+ STUB
+ return 0;
+}
+
+StoreEntry *MemStore::get(const cache_key *)
+{
+ STUB
+ return NULL;
+}
+
+uint64_t MemStore::maxSize() const
+{
+ STUB
+ return 0;
+}
+
+uint64_t MemStore::minSize() const
+{
+ STUB
+ return 0;
+}
+
+uint64_t MemStore::currentSize() const
+{
+ STUB
+ return 0;
+}
+
+uint64_t MemStore::currentCount() const
+{
+ STUB
+ return 0;
+}
+
+int64_t MemStore::maxObjectSize() const
+{
+ STUB
+ return 0;
+}
+
+StoreSearch *MemStore::search(String const, HttpRequest *)
+{
+ STUB
+ return NULL;
+}
+
+bool MemStore::dereference(StoreEntry &)
+{
+ STUB
+ return false;
+}
#include "config.h"
#include "ipc/Port.h"
+#define STUB_API "ipc/Port.cc"
+#include "tests/STUB.h"
+
const char Ipc::coordinatorAddr[] = "";
+const char Ipc::strandAddrPfx[] = "";
+
+String Ipc::Port::MakeAddr(char const*, int)
+{
+ STUB
+ return "";
+}
+++ /dev/null
-#include "config.h"
-#include "fatal.h"
-#include "ipc/TypedMsgHdr.h"
-
-Ipc::TypedMsgHdr::TypedMsgHdr()
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::getFixed(void *raw, size_t size) const
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::putFixed(const void *raw, size_t size)
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::getString(String &size) const
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::putString(const String & size)
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::checkType(int destType) const
-{
- fatal("Not implemented");
-}
-
-void
-Ipc::TypedMsgHdr::setType(int aType)
-{
- fatal("Not implemented");
-}
fatal("not implemented 11");
}
+YesNoNone::YesNoNone()
+{
+ /* ignore this for testing */
+}
+
+YesNoNone::operator void*() const
+{
+ /* ignore this for testing */
+ return NULL;
+}
+
/*
* DO NOT MODIFY:
* arch-tag: 9bbc3b5f-8d7b-4fdc-af59-0b524a785307
const char *StoreEntry::getMD5Text() const STUB_RETVAL(NULL)
StoreEntry::StoreEntry() STUB
StoreEntry::StoreEntry(const char *url, const char *log_url) STUB
+StoreEntry::~StoreEntry() STUB
HttpReply const *StoreEntry::getReply() const STUB_RETVAL(NULL)
void StoreEntry::write(StoreIOBuffer) STUB
bool StoreEntry::isAccepting() const STUB_RETVAL(false)
void Store::sync() STUB
void Store::unlink(StoreEntry &) STUB
+std::ostream &operator <<(std::ostream &os, const StoreEntry &)
+{
+ STUB
+ return os;
+}
+
SQUIDCEXTERN size_t storeEntryInUse() STUB_RETVAL(0)
SQUIDCEXTERN const char *storeEntryFlags(const StoreEntry *) STUB_RETVAL(NULL)
void storeEntryReplaceObject(StoreEntry *, HttpReply *) STUB
{}
bool
-storeRebuildLoadEntry(MemBuf &buf, StoreEntry &e, cache_key *key,
- struct _store_rebuild_data &counts, uint64_t expectedSize)
+storeRebuildLoadEntry(int, int, MemBuf&, _store_rebuild_data&)
{
return false;
}
{
return false;
}
+
+bool
+storeRebuildParseEntry(MemBuf &, StoreEntry &, cache_key *, struct _store_rebuild_data &, uint64_t)
+{
+ return false;
+}
assert(dst);
return memset(dst, val, sz);
}
+
+bool
+IamWorkerProcess()
+{
+ fprintf(stderr, "Not implemented");
+ return true;
+}
+
+bool
+IamDiskProcess()
+{
+ fprintf(stderr, "Not implemented");
+ return false;
+}
+
+bool
+IamMasterProcess()
+{
+ fprintf(stderr, "Not implemented");
+ return false;
+}
+
+bool
+UsingSmp()
+{
+ fprintf(stderr, "Not implemented");
+ return false;
+}
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
- StorePointer aRoot (new StoreController);
-
- Store::Root(aRoot);
+ Store::Root(new StoreController);
SwapDirPointer aStore (new CossSwapDir());
/* TODO: check the size */
- free_cachedir(&Config.cacheSwap);
-
Store::Root(NULL);
+ free_cachedir(&Config.cacheSwap);
+
/* todo: here we should test a dirty rebuild */
// safe_free(Config.replPolicy->type);
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
- StorePointer aRoot (new StoreController);
-
- Store::Root(aRoot);
+ Store::Root(new StoreController);
SwapDirPointer aStore (new CossSwapDir());
CPPUNIT_ASSERT(search->isDone() == true);
CPPUNIT_ASSERT(search->currentItem() == NULL);
- free_cachedir(&Config.cacheSwap);
-
Store::Root(NULL);
+ free_cachedir(&Config.cacheSwap);
+
/* todo: here we should test a dirty rebuild */
//TODO: do this once, or each time. safe_free(Config.replPolicy->type);
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
- StorePointer aRoot (new StoreController);
- Store::Root(aRoot);
+ Store::Root(new StoreController);
SwapDirPointer aStore (new CossSwapDir());
addSwapDir(aStore);
commonInit();
safe_free(config_line);
CPPUNIT_ASSERT(aStore->io != NULL);
- free_cachedir(&Config.cacheSwap);
Store::Root(NULL);
+ free_cachedir(&Config.cacheSwap);
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
}
return 1;
}
+uint64_t
+TestStore::currentSize() const
+{
+ return 2;
+}
+
+uint64_t
+TestStore::currentCount() const
+{
+ return 2;
+}
+
+int64_t
+TestStore::maxObjectSize() const
+{
+ return 1;
+}
+
void
TestStore::stat(StoreEntry &) const
{
virtual uint64_t minSize() const;
+ virtual uint64_t currentSize() const;
+
+ virtual uint64_t currentCount() const;
+
+ virtual int64_t maxObjectSize() const;
+
virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
virtual void reference(StoreEntry &) {} /* Reference this object */
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
- StorePointer aRoot (new StoreController);
-
- Store::Root(aRoot);
+ Store::Root(new StoreController);
SwapDirPointer aStore (new UFSSwapDir("ufs", "Blocking"));
CPPUNIT_ASSERT(search->isDone() == true);
CPPUNIT_ASSERT(search->currentItem() == NULL);
+ Store::Root(NULL);
+
free_cachedir(&Config.cacheSwap);
/* todo: here we should test a dirty rebuild */
- Store::Root(NULL);
safe_free(Config.replPolicy->type);
delete Config.replPolicy;
// objects such as "StorePointer aRoot" from being called.
CPPUNIT_ASSERT(!store_table); // or StoreHashIndex ctor will abort below
- StorePointer aRoot (new StoreController);
- Store::Root(aRoot);
+ Store::Root(new StoreController);
SwapDirPointer aStore (new UFSSwapDir("ufs", "Blocking"));
addSwapDir(aStore);
commonInit();
safe_free(config_line);
CPPUNIT_ASSERT(aStore->IO->io != NULL);
- free_cachedir(&Config.cacheSwap);
Store::Root(NULL);
+ free_cachedir(&Config.cacheSwap);
safe_free(Config.replPolicy->type);
delete Config.replPolicy;