summaryrefslogtreecommitdiff
path: root/tests/isisd/test_common.c
AgeCommit message (Collapse)Author
2025-04-08tests: clean up variable-shadow warningsMark Stapp
Clean up -Wshadow warnings in unit-tests Signed-off-by: Mark Stapp <mjs@cisco.com>
2023-04-18isisd: add isis flex-algo lsp advertisementHiroki Shirokura
Deal with the packing and unpacking of following Flex-Algo Sub-Sub-TLVs: - Router Capability (already defined TLV 242) - List of the Flex-Algo Definitions (Sub-TLV 26) - Exclude admin group (Sub-Sub-TLV 1) - Include-any admin group (Sub-Sub-TLV 2) - Include-all admin group (Sub-Sub-TLV 3) - Flags (for prefix-metric) (Sub-Sub-TLV 4) This commit splits data into multiple router capability TLVs if needed because a TLV cannot contains more than 255 bytes. Note that the list of SR Algorithm (Sub-TLV 19) within Router Capability (TLV 242) is already set in a previous commit. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Eric Kinzie <ekinzie@labn.net> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18isisd: update isis_tlvs_add_*_reach() with multi algorithmHiroki Shirokura
isis_tlvs_add_extended_ip_reach adds IS-IS Extended IP reachability to the LSP. In this case, if the pcfg argument is not NULL, you can add IGP Prefix-SID as its sub tlv. Before this commit, only one Prefix-SID can be added. After this commit, the argument is not a single pointer but an array of pointers, and multiple Prefix-SIDs can be added. This feature is necessary because Flex-Algo requires multiple Prefix-SIDs for each Algorithm. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-03-24*: Convert `struct event_master` to `struct event_loop`Donald Sharp
Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert struct thread_master to struct event_master and it's ilkDonald Sharp
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-06-11isisd: per-instance dynamic hostname cacheIgor Ryzhov
Currently, the dynamic hostname cache is global. It is incorrect because neighbors in different VRFs may have the same system ID and different hostnames. This also fixes a memory leak - when the instance is deleted, the cache must be cleaned up and the cleanup thread must be cancelled. Fixes #8832. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-01-08tests: add remote LFA unit testsRenato Westphal
Extend the existing SPF unit testing infrastructure so that it can test RLFA as well. These new unit tests are useful to test the RLFA PQ node computation on several different network topologies in a timely manner. Artificial LDP labels (starting from 50000) are used to activate the computed RLFAs. It's worth mentioning that the computed backup routing tables contain both local LFAs and remote LFAs, as running RLFA separately isn't possible. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14tests: add IS-IS TI-LFA unit testsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-26tests, isisd: add IS-IS SPF unit testsRenato Westphal
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>