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:
parent
f621cfc984
commit
7d927155db
1 changed files with 19 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue