]> git.proxmox.com Git - mirror_frr.git/commit - isisd/isisd.h
tests, isisd: add IS-IS SPF unit tests
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 24 Aug 2020 17:46:36 +0000 (14:46 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 26 Aug 2020 23:16:19 +0000 (20:16 -0300)
commit52a7c25e63a3d62072aa4fb1ed415fe478ce2ef9
tree1c5275b3da3fac27e478dd03781f183b870f21b5
parent7b36d36e0ed2a233c3a908c9e821e3f45c68d4e8
tests, isisd: add IS-IS SPF unit tests

Now that the IS-IS SPF code is more modular, write some unit tests
for it.

This commit includes a new test program called "test_isis_spf" which
can load any test topology (there are 13 different ones available)
and run SPF on any desired node. In the future this same test program
and topologies will also be used to test reverse SPF and TI-LFA.

The "test_common.c" file contains helper functions used to parse the
topology descriptions from "test_topologies.c" into LSP databases
that can be used as an input to the SPF code.

This commit also introduces the F_ISIS_UNIT_TEST flag which is used
to prevent the IS-IS code from scheduling any event when running
under the context of an unit test.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
20 files changed:
isisd/isis_dynhn.c
isisd/isis_dynhn.h
isisd/isis_misc.c
isisd/isis_route.c
isisd/isis_spf.c
isisd/isis_spf.h
isisd/isisd.c
isisd/isisd.h
tests/.gitignore
tests/isisd/test_common.c [new file with mode: 0644]
tests/isisd/test_common.h [new file with mode: 0644]
tests/isisd/test_fuzz_isis_tlv.c
tests/isisd/test_isis_lspdb.c
tests/isisd/test_isis_spf.c [new file with mode: 0644]
tests/isisd/test_isis_spf.in [new file with mode: 0644]
tests/isisd/test_isis_spf.py [new file with mode: 0644]
tests/isisd/test_isis_spf.refout [new file with mode: 0644]
tests/isisd/test_isis_vertex_queue.c
tests/isisd/test_topologies.c [new file with mode: 0644]
tests/subdir.am