Commit d35ac0a1 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2836] make tests safer when USE_SHARED_MEMORY is undefined.

- explicitly include config.h in these tests
- move helper function only used with USE_SHARED_MEMORY inside the ifdef block
parent ac01dfd0
......@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <util/unittests/check_valgrind.h>
#include <dns/name.h>
......
......@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <datasrc/client_list.h>
#include <datasrc/client.h>
#include <datasrc/cache_config.h>
......
......@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <util/memory_segment_local.h>
#include <util/memory_segment_mapped.h>
......@@ -83,6 +85,7 @@ TEST(SegmentObjectHolderTest, destroyNotSet) {
EXPECT_TRUE(sgmt.allMemoryDeallocated());
}
#ifdef USE_SHARED_MEMORY
// Keep allocating bigger and bigger chunks of data until the allocation
// fails with growing the segment.
void
......@@ -103,7 +106,6 @@ allocateUntilGrows(MemorySegment& segment, size_t& current_size) {
// Check that the segment thing releases stuff even in case it throws
// SegmentGrown exception and the thing moves address
#ifdef USE_SHARED_MEMORY
TEST(SegmentObjectHolderTest, grow) {
MemorySegmentMapped segment(mapped_file,
isc::util::MemorySegmentMapped::CREATE_ONLY);
......
......@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <datasrc/memory/zone_data_updater.h>
#include <datasrc/memory/rdataset.h>
#include <datasrc/memory/zone_data.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment