diff options
| author | Renato Westphal <renato@openbsd.org> | 2018-07-14 11:47:54 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-14 11:47:54 -0300 |
| commit | 0e2f00b0d56c64504790bc45479620288e93cd05 (patch) | |
| tree | d5e44db9d3b8c0833969e5216d3a15f32abe7119 /tests/lib/test_srcdest_table.c | |
| parent | 51034b787fa4a2e68914eb072911110b984d340e (diff) | |
| parent | 432eaa5d971448a601c5a49f04e1e679d90a1ddc (diff) | |
Merge pull request #2658 from mjstapp/srcdest_test_const
tests: align with srcdest lib changes, remove bgp binary
Diffstat (limited to 'tests/lib/test_srcdest_table.c')
| -rw-r--r-- | tests/lib/test_srcdest_table.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c index 04e85435d1..53180564bd 100644 --- a/tests/lib/test_srcdest_table.c +++ b/tests/lib/test_srcdest_table.c @@ -228,7 +228,8 @@ static void test_dump(struct test_state *test) } static void test_failed(struct test_state *test, const char *message, - struct prefix_ipv6 *dst_p, struct prefix_ipv6 *src_p) + const struct prefix_ipv6 *dst_p, + const struct prefix_ipv6 *src_p) { char *route_id = format_srcdest(dst_p, src_p); @@ -250,7 +251,7 @@ static void test_state_verify(struct test_state *test) /* Verify that there are no elements in the table which have never * been added */ for (rn = route_top(test->table); rn; rn = srcdest_route_next(rn)) { - struct prefix_ipv6 *dst_p, *src_p; + const struct prefix_ipv6 *dst_p, *src_p; /* While we are iterating, we hold a lock on the current * route_node, @@ -288,10 +289,10 @@ static void test_state_verify(struct test_state *test) expected_lock++; if (rn->lock != expected_lock) { - struct prefix_ipv6 *dst_p, *src_p; + const struct prefix_ipv6 *dst_p, *src_p; srcdest_rnode_prefixes( - rn, (struct prefix **)&dst_p, - (struct prefix **)&src_p); + rn, (const struct prefix **)&dst_p, + (const struct prefix **)&src_p); test_failed( test, @@ -305,8 +306,8 @@ static void test_state_verify(struct test_state *test) assert(rn->info == (void *)0xdeadbeef); - srcdest_rnode_prefixes(rn, (struct prefix **)&dst_p, - (struct prefix **)&src_p); + srcdest_rnode_prefixes(rn, (const struct prefix **)&dst_p, + (const struct prefix **)&src_p); memcpy(&hash_entry[0], dst_p, sizeof(*dst_p)); if (src_p) memcpy(&hash_entry[1], src_p, sizeof(*src_p)); @@ -377,7 +378,7 @@ static void test_state_del_one_route(struct test_state *test, struct prng *prng) which_route = prng_rand(prng) % test->log->count; struct route_node *rn; - struct prefix *dst_p, *src_p; + const struct prefix *dst_p, *src_p; struct prefix_ipv6 dst6_p, src6_p; for (rn = route_top(test->table); rn; rn = srcdest_route_next(rn)) { |
