summaryrefslogtreecommitdiff
path: root/src/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: Revise the build systemdimitri staessens2017-08-212-2/+9
| | | | | | | | | | This revises the build system to have configuration per system component. System settings can now be set using cmake. The standard compliance defines were removed from configuration header and are set in the sources where needed. Also some small code refactors, such as moving the data for shims out of the ipcp structure to the respective shims were performed.
* lib: Add basic FRCT mechanismsSander Vrijders2017-08-172-0/+107
| | | | | | | | | | This adds the basic FRCT mechanisms to the library. Upon flow alloc or accept an FRCT instance is now created and used when reading or writing to the flow. The timerwheel has been refactored to allow recharging timers and removing them and is now part of the library. The first SDU sent over the connection has the DRF set and this initializes the connection. Sender and receiver inactivity timers are added.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-138-8/+8
|
* build: Fix compilation on OS X Sierradimitri staessens2017-08-112-1/+2
|
* build: Add check for robust mutexesSander Vrijders2017-08-031-2/+2
| | | | | | This adds a check for robust mutexes. The constant HAVE_ROBUST_MUTEX is set accordingly in config.h. It also adds some other fixes to make the prototype compile on the Hurd.
* lib: Fix bug and add test for time_utilsdimitri staessens2017-07-052-0/+165
|
* lib: Fix bug in bitmapdimitri staessens2017-05-241-2/+13
|
* lib: Add implementation for MD5 hashesdimitri staessens2017-04-162-0/+153
|
* lib: Fix minor things in sha3 implementationdimitri staessens2017-04-161-0/+37
|
* lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-132-51/+51
| | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* lib: Add a check if a bitmap ID is in usedimitri staessens2017-04-011-9/+26
|
* lib: Fix bugs in B-treeSander Vrijders2017-03-311-5/+29
| | | | | This fixes some bugs in the B-tree implementation. The test has also been rewritten to be more thorough.
* ipcpd: normal: Fill in forwarding tableSander Vrijders2017-03-241-8/+2
| | | | | | The routing now takes the results of the routing table to fill in the forwarding table, by going through the neighbors and filling in the right fd.
* Change email addresses to ugent.beSander Vrijders2017-03-036-6/+12
| | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
* build: Format CMakeLists.txt filesSander Vrijders2017-03-031-10/+10
| | | | The CMakeLists files are now properly indented.
* ipcpd: Move RIB configuration to common headerdimitri staessens2017-02-171-0/+2
| | | | | Moves the definitions of paths in the RIB for the normal IPCP to a header ribconfig.h to avoid repetition.
* lib: Fix bug in rib_testdimitri staessens2017-02-091-1/+1
|
* lib: Add packing and unpacking RIBdimitri staessens2017-01-311-0/+39
| | | | | | | | | | | | | | | | | | | The rib_pack function allows packing a subtree of the RIB for dissemination. The options PACK_HASH_ROOT and PACK_HASH_ALL will add the hashes for the root object of the packed subtree or every object to the packed message respectively. Checking of the hashes is currently only performed at the top level object, verifying the complete operation. The rib_unpack function unpacks a packed message and inserts its contents in the RIB. The option UNPACK_CREATE flags that the unpack operation is allowed to create new objects, else it will only update existing objects. More advanced options could be added in the future. The packed message structure uses Google Protocol Buffers, as defined in ro.proto. It adds tests for these functions to the rib_test.
* lib: Add function to get children of node in RIBdimitri staessens2017-01-291-0/+24
| | | | | Returns the names of the nodes (not the full paths). The function allocates memory to the children pointer that should be freed.
* lib: Add new version of Resource Information Basedimitri staessens2017-01-212-0/+223
| | | | | | | | | | | | The new RIB is implemented as a tree with doubly linked nodes (parents keep a link to each child, each child keeps a link to its parent). An index is kept in a btree using CRC32 hashes of the path name in the RIB. Nodes keep an SHA3-256 hash value that is unique for the entire subtree. This allows quick checks to see if two RIB subtrees are in sync. The event system for the RIB is based on the event system for flows (fqueue), but implemented completely in dynamic memory using linked lists. An initial test is performed for the RIB. This PR does not modify existing code to use the new RIB.
* lib: Add B-tree implementationdimitri staessens2017-01-162-0/+81
| | | | | Adds an implementation of B-trees of order k (k children, min fill is k/2, max fill k - 1). Useful to implement indexes for faster lookups.
* lib: Add test for crc32 functiondimitri staessens2017-01-152-0/+72
|
* lib: Add test for SHA-3 functiondimitri staessens2017-01-132-0/+296
| | | | Test the SHA3 function with known hashes.
* build: Update licenses and copyrightdimitri staessens2017-01-092-2/+2
| | | | | Copyright is set to 2016 - 2017. License text on includes and sources in the library are changed to indicate the LGPLv2.1 license.
* ouroboros: Correct license statementsdimitri staessens2016-12-242-6/+4
| | | | | This corrects the license statements on all files. Installed headers are LGPLv2.1, the rest of the code is GPLv2.
* lib, ipcpd: Add hashtable and PDU Forwarding FunctionSander Vrijders2016-12-212-0/+134
| | | | | | | This adds a hash table that takes 64-bit integers as key and uses separate chaining on collision. It also adds the PDU Forwarding Function, which the Flow Manager can use to lookup the fd towards the next hop. Routing policies will add/update/remove entries in the PFF.
* build: Comply with -Wextra compiler flagdimitri staessens2016-10-211-0/+3
| | | | | This reduces the risk for some bugs, for instance due to signed/unsigned mismatches and unused variables.
* lib, ipcpd: removed du_buff and pcidimitri staessens2016-06-292-71/+0
| | | | Fixes #3
* 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.