Commit graph

24 commits

Author SHA1 Message Date
Ondrej Zajicek (work)
14fc24f3a5 Trie: Implement longest-prefix-match queries and walks
The prefix trie now supports longest-prefix-match query by function
trie_match_longest_ipX() and it can be extended to iteration over all
covering prefixes for a given prefix (from longest to shortest) using
TRIE_WALK_TO_ROOT_IPx() macro.
2021-11-26 03:26:36 +01:00
Ondrej Zajicek (work)
067f69a56d Filter: Add prefix trie benchmarks
Add trie tests intended as benchmarks that use external datasets
instead of generated prefixes. As datasets are not included, they
are commented out by default.
2021-09-25 16:06:43 +02:00
Ondrej Zajicek (work)
e709dc09e6 Filter: Improve prefix trie tests
Add tests explicitly matching insides and outsides of trie and update
tests to do testing of both IPv4 and IPv6 tries.
2021-09-25 16:06:43 +02:00
Ondrej Zajicek (work)
77ce849ecf Tests: Add missing mockup function to tests 2021-02-10 17:29:14 +01:00
Ondrej Zajicek (work)
63451c1961 Test: Fix unit test mockups 2020-06-03 16:15:29 +02:00
Maria Matejka
a1b61a271a IPv6 address parser: fail on incomplete addresses 2020-05-01 15:19:12 +02:00
Ondrej Zajicek (work)
3dabf7b8d0 Test: Improve filter_test
Initial parsing of test.conf must be done directly in filter_test main,
while reconfiguration is handled as a regular test. Also fix several
minor issues in test code.
2019-12-17 00:01:53 +01:00
Maria Matejka
d6eea6caee Testing measures times 2019-10-09 17:47:14 +02:00
Maria Matejka
c41a914d6e Testing: Don't call vsnprintf with NULL format 2019-10-04 20:52:07 +02:00
Maria Matejka
24493e9169 Fixed undefined behavior on signals.
The C11 specification allows only sig_atomic_t and _Atomic variable
access. All other accesses to global variables are undefined behavior.

Using int was probably OK on x86 and x86_64; yet there were some reports
from other architectures (especially some MIPS) that in rare cases,
after issuing SIGHUP, BIRD did strange things.
2019-10-04 20:52:07 +02:00
Maria Matejka
b2a4feeb4c Merge branch 'master' into mq-filter-stack 2019-07-10 11:27:08 +02:00
Maria Matejka
1322e205e2 Test: Fixed annoying warnings (and possible obscure bugs). 2019-07-09 14:37:14 +02:00
Maria Matejka
bb001af0e8 Test: better random u64 generator 2019-07-09 14:37:14 +02:00
Maria Matejka
eac9250fd5 Merge branch 'master' into mq-filter-stack 2019-07-03 11:12:25 +02:00
Ondrej Zajicek (work)
bb57d9171f Add mock-up function for unit tests
They failed without it.
2019-06-30 22:30:56 +02:00
Ondrej Zajicek (work)
bdf2e55d98 Add mock-up function for unit tests
They failed without it.
2019-06-12 18:02:01 +02:00
Maria Matejka
d348a916f5 Test: Added -d flag to die directly after first error. 2019-02-20 22:30:55 +01:00
Maria Matejka
0a793ebc60 Test: Fixed annoying warnings (and possible obscure bugs). 2019-02-20 22:30:54 +01:00
Jan Maria Matejka
ee7e2ffd26 Protocol: Introducing an enum protocol_class
This supersedes the EAP_* constants.
2018-05-29 12:35:06 +02:00
Ondrej Zajicek (work)
212eda07c4 Timers: Fix tests after timer change 2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work)
eeba61ccd5 Minor cleanups 2016-12-13 20:18:11 +01:00
Pavel Tvrdik
5e3cd0e5b5 Birdtest: Replace BT_SUCCESS and BT_FAILURE with 1 and 0 2016-11-11 17:43:09 +01:00
Pavel Tvrdik
fa71b268a8 Birdtest: Put hard new lines for strict line width
This patch ensures width of output lines from testing framework (not
debug output). So output piped lined into file that has default width 80
cols is now correctly wrapped.
2016-11-11 17:03:43 +01:00
Ondrej Zajicek (work)
9b0a0ba9e6 Unit Testing for BIRD
- Unit Testing Framework (BirdTest)
 - Integration of BirdTest into the BIRD build system
 - Tests for several BIRD modules

 Based on squashed Pavel Tvrdik's int-test branch, updated for
 current int-new branch.
2016-11-09 16:36:34 +01:00