Merge pull request #2662 from donaldsharp/tests

Tests
This commit is contained in:
Lou Berger 2018-07-25 17:53:05 -04:00 committed by GitHub
commit b77da155be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -116,8 +116,8 @@ static void check_lookup_result(struct list *list, va_list arglist)
assert(prefix_count == listcount(list));
}
static void do_test(struct bgp_table *table, const char *prefix, uint8_t maxlen,
...)
static void do_test(struct bgp_table *table, const char *prefix,
uint32_t maxlen, ...)
{
va_list arglist;
struct list *list = list_new();

View File

@ -821,6 +821,7 @@ static void parse_test(struct peer *peer, struct test_segment *t, int type)
switch (type) {
case CAPABILITY:
len += 2; /* to cover the OPT-Param header */
__attribute__ ((fallthrough));
case OPT_PARAM:
printf("len: %u\n", len);
/* peek_for_as4 wants getp at capibility*/

View File

@ -392,7 +392,8 @@ static void test_state_del_one_route(struct test_state *test, struct prng *prng)
}
assert(rn);
srcdest_rnode_prefixes(rn, &dst_p, &src_p);
srcdest_rnode_prefixes(rn, (const struct prefix **)&dst_p,
(const struct prefix **)&src_p);
memcpy(&dst6_p, dst_p, sizeof(dst6_p));
if (src_p)
memcpy(&src6_p, src_p, sizeof(src6_p));