0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
Commit Graph

2642 Commits

Author SHA1 Message Date
Pavel Tvrdík
a35f717f0f lib/ip.c: add parenthesis for better readability 2015-04-03 12:49:21 +02:00
Pavel Tvrdík
e7bb2daf1f Birdtest: improve bt_check macro
Now dat for testing can be defined somelike this:

  struct in_out_data_ {
    char *in;
    u32 out;
  } in_out_data[] = {
      {
	  .in  = "192.168.1.128",
	  .out = build_ip4(192, 168, 1, 128),
      },
      {
	  .in  = "255.255.255.255",
	  .out = build_ip4(255, 255, 255, 255),
      },
      ...
  };

  bt_check(ip4_pton_, in_out_data, "%s", "0x%08X");
2015-04-03 12:46:04 +02:00
Pavel Tvrdík
1bdf2a54ed Birdtest: move def bt_rand_num() at a better place 2015-04-03 12:44:47 +02:00
Pavel Tvrdík
4b5e005d57 Birdtest: Add printing backtrace while segfault 2015-04-03 12:42:49 +02:00
Pavel Tvrdík
a0ab20320c Birdtest: Improve build scripts
Add make rule 'clean-tests'
Add tests sources to dependecy generator
2015-04-03 12:40:07 +02:00
Pavel Tvrdík
d73e21e611 Birdtest: IP One-Complement Checksum Tests 2015-03-30 18:54:09 +02:00
Pavel Tvrdík
7379684211 Birdtest: small fix in md5_test 2015-03-30 18:52:58 +02:00
Pavel Tvrdík
3bbe27472c Birdtest: Add test for lib/bitops.c 2015-03-27 14:10:28 +01:00
Pavel Tvrdík
733088e798 Birdtest: Add test for lib/buffer_test.c 2015-03-27 14:10:00 +01:00
Pavel Tvrdík
c19954e74d Birdtest: Add test for lib/md5.c 2015-03-27 14:09:27 +01:00
Pavel Tvrdík
3c2ac3887e Birdtest: Refactorize heap_test.c and lists_test.c 2015-03-27 14:08:39 +01:00
Pavel Tvrdík
8edf5b99e8 Birdtest: Add bt_check()
- A function for check test some other function for
    in and out/expected data in array.
2015-03-27 14:04:37 +01:00
Pavel Tvrdík
cf545a3ceb Birdtest: Add bt_rand_num() 2015-03-27 14:03:47 +01:00
Pavel Tvrdík
016e7be6e5 Birdtest: Fix calc num of build-failured tests 2015-03-27 14:01:30 +01:00
Pavel Tvrdík
f26cf70152 Birdtest: Refactore tests and build system
Rename directory:
  birdtest/* -> test/*

Rename Makefile rule:
  build-tests -> tests

Move run-all-test shell script from Makefile to stand-alone shell script

Simplify Makefile test build system
2015-03-23 17:40:13 +01:00
Pavel Tvrdík
99d14b1ab3 Add header wrap defines to lib/buffer.h 2015-03-19 18:42:33 +01:00
Pavel Tvrdík
ae111d04c5 Birdtest: Remove copyrights 2015-03-19 18:38:38 +01:00
Pavel Tvrdík
5a1b5e0119 Birdtest: Output the number of Test Build Failures 2015-03-19 18:37:18 +01:00
Pavel Tvrdík
7d0c9831f8 Birdtest: Add echoing of compilation command 2015-03-17 12:43:01 +01:00
Pavel Tvrdík
a2cdd9532d Addition necessary includes in headers files 2015-03-17 12:39:10 +01:00
Pavel Tvrdík
53e27ec79d Separate a definition of NULL to standalone header
A lib/list.h had circular dependency through include nest/bird.h
  nest/bird.h requires lib/birdlib.h
  lib/birdlib.h requires timer.h
  timer.h requires lib/resource.h
  lib/resource.h requires lib/list.h
2015-03-17 12:31:14 +01:00
Pavel Tvrdík
3e644333a2 Birdtest: A small change in testing output 2015-03-17 11:28:41 +01:00
Pavel Tvrdík
e8b3845e86 Birdtest: Add default timeout and forking setting 2015-03-17 11:27:40 +01:00
Pavel Tvrdík
a8a67537ed Add unit tests for lib/lists.c datastructures 2015-03-13 18:37:21 +01:00
Pavel Tvrdík
5063d4f7a3 Add unit tests for lib/heap.h datastructures 2015-03-13 18:36:10 +01:00
Pavel Tvrdík
4e4ed8dd4e Birdtest: Add BT_SUCCESS for success end of test
Add BT_FAILURE for bad end of test
2015-03-13 18:30:03 +01:00
Pavel Tvrdík
0bbfd59dce Birdtest: Customize outputs from testing framework 2015-03-13 18:29:21 +01:00
Pavel Tvrdík
e4c4c7667a Birdtest: add bt_debug() for tests debug outputs
Debug outputs will show with launch test with param -vv
2015-03-13 18:27:33 +01:00
Pavel Tvrdík
56fe8bc26c Birdtest: Customize Makefiles build system
From root dir is possible launch:
  $ make check         # for re-build and run all tests
  $ make build-tests   # for re-build all tests only
2015-03-13 18:23:31 +01:00
Pavel Tvrdík
02a844cbf9 Add Ondrej Zajicek Unit Testing Framework
- Add Ondrej Zajicek Unit Testing Framework -- BirdTest
 - An Integration the BirdTest (BT) into the BIRD's build system.
2015-03-07 10:30:55 +01:00
Ondrej Zajicek
4e63974471 Add minor comment 2015-02-24 16:19:14 +01:00
Ondrej Zajicek
9c89560e6c Use IP_PORTRANGE_HIGH for BFD where available 2015-02-22 20:14:14 +01:00
Ondrej Zajicek
6cf72d7ad7 Rename BGP option 'start delay' to 'connect delay'
Also update log message for error-triggered startup delay.
2015-02-22 17:21:54 +01:00
Ondrej Zajicek
a1beb8f3ee Relax BGP neighbor parameter
Permit specifying neighbor address, AS number and port independently.
Add 'interface' parameter for specifying interface for link-local
sessions independently.

Thanks to Alexander V. Chernikov for the original patch.
2015-02-22 13:50:58 +01:00
Ondrej Zajicek
86c3eea0f3 Use AF_UNSPEC for RTM_GETLINK
This value is specified in documentation.
2015-02-21 21:19:49 +01:00
Ondrej Zajicek
2bbc308321 Store protocol config size inside protocol structure
Make proto_config_new() use this info instead of supplied size.

Thanks to Alexander V. Chernikov for the patch.
2015-02-21 21:08:23 +01:00
Ondrej Zajicek
374917adcc Make BGP protocol instance search a separate function
Thanks to Alexander V. Chernikov for the patch.
2015-02-21 20:55:43 +01:00
Pavel Tvrdík
6264aad16f Minor fixes 2015-02-21 20:11:02 +01:00
Pavel Tvrdik
85a3639d99 Better Clang compatibility 2015-02-21 20:07:17 +01:00
Pavel Tvrdik
7d37bf79de Remove a comparison of unsigned expression < 0 2015-02-21 19:38:44 +01:00
Pavel Tvrdik
e598853e68 Add const to a param msg at functions log_msg, log_rl, die, bug and debug 2015-02-21 19:32:57 +01:00
Pavel Tvrdik
4a591d4b94 Replacing GNU old-style field designator extension 2015-02-21 19:31:36 +01:00
Ondrej Zajicek
8ce9a87755 Fixes minor bug in BFD.
Thanks to Pavel Tvrdik for noticing it.
2015-02-21 14:52:17 +01:00
Ondrej Zajicek
51762a45b3 Allows user data attached to f_trie_node structure.
Thanks to Alexander Chernikov for the patch.
2015-02-21 14:05:20 +01:00
Ondrej Zajicek
bc7f4e0e34 Bump max symbol length to 64.
And move the constant to conf.h header.

Thanks to Alexander Chernikov for the patch.
2015-02-21 12:42:31 +01:00
Ondrej Zajicek
ab00639130 Fixes a bug in locking code.
When multiple protocols have a lock for the same IP address, it crashes
under some circumstances.

Thanks to Matthias Schiffer for the bugreport.
2015-02-21 12:30:14 +01:00
Ondrej Zajicek
dfc7a6c6a0 Fixes potential alignment bug in BGP.
Thanks to Andrew (seti.kr.ua) for the bug report.
2015-02-21 12:24:30 +01:00
Ondrej Zajicek
523f020b5f Link state support in BGP.
Configurable fast shutdown of a BGP session when an interface loses link.
2015-02-21 12:15:56 +01:00
Ondrej Zajicek
7730553b7e Merge remote-tracking branch 'origin/soft-int' 2015-02-21 11:39:45 +01:00
Ondrej Zajicek
0da562a7cb Fixes error message in 'show route' cmd.
Message 'Network not in table' was not reported if a network node without
any routes was found in a routing table.
2014-11-08 23:52:42 +01:00