summaryrefslogtreecommitdiff
path: root/src/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/test: removed the test for the shm_du_mapdimitri staessens2016-05-092-195/+0
| | | | | | | The test had a synchronisation issue. Due to rebuild of the shm_du_map for random access, there was also a hack in the shm_du_map specifically to run this test. Because of this hack, the decision was made to drop this test.
* irmd: flow allocation and fast pathdimitri staessens2016-05-071-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit has a first implementation of flow allocation (the "slow path") and read/write (the "fast path") for ouroboros. It provides basic but unstable communications over the shared memory. It required a lot of changes all over the stack, and fixes a number of previously undetected issues. This PR still need heavy revision regarding data model, locking and cleanup. lib/dev: modifications to the API. It now uses an ap_init() call to set the AP name and sets the Instance ID to the pid of the process. It also binds the AP to the shared memory and creates tables for mappings in the fast path. A call to ap_fini() releases the resources. lib/shm_ap_rbuff: added ring buffer for data exchange between processes in the fast path. It passes an index in the shm_du_map. lib/shm_du_map: rewrote API to work with calls from dev.c. Garbage collector added. Tests updated to new API. ipcpd/ipcp-data: removed everything related to flows, as these are universal for all ap's and kept in ap_data (dev.c), or similar structs for shim ipcps. shim-udp: added flow allocator and read/write functions and shm elements. irmd: revised data model and structures necessary for flow allocation. tools: echo updated to new dev.h API. messaging system was updated to comply with new flow allocation messages. All exchanges use pid and port_id to bootstrap the fast path.
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-builddimitri staessens2016-04-011-0/+1
|\
| * lib, irmd: Update communication with IRMdSander Vrijders2016-03-301-0/+1
| | | | | | | | | | All messages sent to the IRMd now also get a reply back with the result of the operation.
* | build: Cleanup of tests builddimitri staessens2016-04-011-8/+8
|/
* lib/ipcpd: fixed logging mistakedimitri staessens2016-03-251-0/+4
| | | | logs should be included in source, not in header
* lib: Shared Memorydimitri staessens2016-03-244-177/+50
| | | | | | | | Updated tests. Added code to drop a corner case (packet where the tail PCI would cross the edge of the ring buffer) because solving this very rare case is not worth the performance hit on the ringbuffer the extra code would incur. This means the ringbuffer might drop a very small percentage of packets.
* lib: updated shm_du_map to be a hybrid ring bufferDimitri Staessens2016-03-192-44/+20
| | | | | | Elements must be created/destroyed in order, but IPCPs can access PCI while the PDU is in the ring buffer. Test updated, no more waits are needed.
* lib: shared memory mapDimitri Staessens2016-03-194-1/+337
| | | | | | | | | | | | | | | | | | The shared memory map will allow passing SDU's between IPCPs efficiently. It is a single block of managed memory. SDU's are stored in a shm_du_buff datastructure, which is a list of blocks inside the shared memory region. The mechanism for passing SDU's is not yet implemented and could be either within the region or using another local IPC mechanism. The following things are configured at compile time: SHM_FILE_NAME : the name. Default is "ouroboros_du_map". SHM_DU_BUFF_BLOCK_SIZE: size of a block inside the shared memory region. Default is the pagesize of the system. SHM_DU_MAP_SIZE : the approximate size in bytes of the shared memory map. The actual filesize may differ by a small margin. Default is 4MB.
* lib: fixes to du_buffDimitri Staessens2016-03-171-4/+9
| | | | | fixes memleaks in du_buff and du_buff_test fixes bug in copy operation
* lib: Updated du_buff not limit allowable PCI sizeDimitri Staessens2016-03-151-6/+14
| | | | PCI can now occupy at most one block
* lib: Add bitmap testSander Vrijders2016-03-092-0/+78
| | | | | This adds a test for the bitmap. During the testing I also removed some bugs that were present in the bitmap implementation.
* lib: Updated du_buff testDimitri Staessens2016-03-083-30/+3
| | | | | | Tests should have "_test.c" appended and include the source they are testing. The build system will find it in the parent directory. Removed linked_list example test as it is now useless.
* tests: added test for the du_buff structureDimitri Staessens2016-03-082-0/+58
| | | | | | | | | | tests/du_buff.c: tests the du_buff_t structure by creating different size du_buff_t's and filling it with different size sdu's at different locations in the du_buff_t tests/CMakefile.txt: added du_buff test lib/du_buff.c: fixed unsafe #define adding brackets
* build: Add check target, fix packagingSander Vrijders2016-03-072-0/+46
This adds a build target 'check', which executes a test suite for every daemon/library. Every test suite consists of a test driver that executes a function in a file with the same name as the function. The compile_debug script executes the 'check' target to validate there are no regressions. Packaging is also fixed and the prototype can be shipped as a tarball.