1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

tests: minimal test of memory manager

This commit is contained in:
Daniel Krebs 2018-01-31 12:21:36 +01:00 committed by Steffen Vogel
parent f621cfc984
commit 7d927155db

View file

@ -3,6 +3,13 @@
#include <criterion/criterion.h>
#include <villas/directed_graph.hpp>
#include <villas/log.hpp>
#include <villas/memory_manager.hpp>
static void init_graph()
{
spdlog::set_pattern("[%T] [%l] [%n] %v");
spdlog::set_level(spdlog::level::debug);
}
TestSuite(graph,
.description = "Graph library"
@ -102,3 +109,15 @@ Test(graph, path, .description = "Find path")
logger->info(" -> edge {}", edge);
}
}
Test(graph, memory_manager, .description = "Global Memory Manager")
{
auto& mm = villas::MemoryManager::get();
auto dmaRegs = mm.createAddressSpace("DMA Registers");
auto pcieBridge = mm.createAddressSpace("PCIe Bridge");
mm.createMapping(0x1000, 0, 0x1000, dmaRegs, pcieBridge);
mm.dump();
}