summaryrefslogtreecommitdiff
path: root/tests/bgpd/test_aspath.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-22 14:52:33 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-22 14:52:33 +0200
commit9d303b37d73b8fe2bef310d8d9ca1acad23c2501 (patch)
treebbe78c595bd8f42b76322df2a37cf81f60c08a6a /tests/bgpd/test_aspath.c
parentdceb5f8ac71a839389786f5040a50b8feec30156 (diff)
Revert "*: reindent pt. 2"
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/bgpd/test_aspath.c')
-rw-r--r--tests/bgpd/test_aspath.c136
1 files changed, 24 insertions, 112 deletions
diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c
index 706825681b..46462d79c4 100644
--- a/tests/bgpd/test_aspath.c
+++ b/tests/bgpd/test_aspath.c
@@ -50,10 +50,8 @@ struct test_spec {
deleted */
const unsigned int hops; /* aspath_count_hops result */
const unsigned int confeds; /* aspath_count_confeds */
- const int private_as; /* whether the private_as check should pass or
- fail */
- /* $FRR indent$ */
- /* clang-format off */
+ const int private_as; /* whether the private_as check should pass or
+ fail */
#define NOT_ALL_PRIVATE 0
#define ALL_PRIVATE 1
const as_t does_loop; /* an ASN which should trigger loop-check */
@@ -87,14 +85,7 @@ static struct test_segment {
{0x2, 0x1, 0x22, 0x12, 0x2, 0x1, 0x00, 0x04},
8,
{
- "8722 4",
- "8722 4",
- 2,
- 0,
- NOT_ALL_PRIVATE,
- 4,
- 5,
- 8722,
+ "8722 4", "8722 4", 2, 0, NOT_ALL_PRIVATE, 4, 5, 8722,
},
},
{
@@ -407,22 +398,8 @@ static struct test_segment {
"reconcile_start_trans",
"seq(23456,23456,23456) seq(6435,59408,21665)",
{
- 0x2,
- 0x3,
- 0x5b,
- 0xa0,
- 0x5b,
- 0xa0,
- 0x5b,
- 0xa0,
- 0x2,
- 0x3,
- 0x19,
- 0x23,
- 0xe8,
- 0x10,
- 0x54,
- 0xa1,
+ 0x2, 0x3, 0x5b, 0xa0, 0x5b, 0xa0, 0x5b, 0xa0, 0x2, 0x3,
+ 0x19, 0x23, 0xe8, 0x10, 0x54, 0xa1,
},
16,
{"23456 23456 23456 6435 59408 21665",
@@ -434,22 +411,8 @@ static struct test_segment {
"reconcile_start_trans4",
"seq(1842,41591,51793) seq(6435,59408,21665)",
{
- 0x2,
- 0x3,
- 0x07,
- 0x32,
- 0xa2,
- 0x77,
- 0xca,
- 0x51,
- 0x2,
- 0x3,
- 0x19,
- 0x23,
- 0xe8,
- 0x10,
- 0x54,
- 0xa1,
+ 0x2, 0x3, 0x07, 0x32, 0xa2, 0x77, 0xca, 0x51, 0x2, 0x3,
+ 0x19, 0x23, 0xe8, 0x10, 0x54, 0xa1,
},
16,
{"1842 41591 51793 6435 59408 21665",
@@ -461,20 +424,8 @@ static struct test_segment {
"reconcile_start_trans_error",
"seq(23456,23456,23456) seq(6435,59408)",
{
- 0x2,
- 0x3,
- 0x5b,
- 0xa0,
- 0x5b,
- 0xa0,
- 0x5b,
- 0xa0,
- 0x2,
- 0x2,
- 0x19,
- 0x23,
- 0xe8,
- 0x10,
+ 0x2, 0x3, 0x5b, 0xa0, 0x5b, 0xa0, 0x5b, 0xa0, 0x2, 0x2,
+ 0x19, 0x23, 0xe8, 0x10,
},
14,
{"23456 23456 23456 6435 59408", "23456 23456 23456 6435 59408",
@@ -552,10 +503,7 @@ static struct aspath_tests {
0,
0,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 10,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 10,
},
COMMON_ATTR_SIZE + 3,
},
@@ -568,10 +516,7 @@ static struct aspath_tests {
-1,
0,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 8,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 8,
},
COMMON_ATTR_SIZE + 3,
},
@@ -584,10 +529,7 @@ static struct aspath_tests {
-1,
0,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 12,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 12,
},
COMMON_ATTR_SIZE + 3,
},
@@ -602,8 +544,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS_PATH,
- 10,
+ BGP_ATTR_AS_PATH, 10,
},
COMMON_ATTR_SIZE + 3,
},
@@ -618,8 +559,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS4_PATH,
- 10,
+ BGP_ATTR_AS4_PATH, 10,
},
COMMON_ATTR_SIZE + 3,
},
@@ -634,8 +574,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS4_PATH,
- 10,
+ BGP_ATTR_AS4_PATH, 10,
},
COMMON_ATTR_SIZE + 3,
},
@@ -648,10 +587,7 @@ static struct aspath_tests {
0,
PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 18,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 18,
},
COMMON_ATTR_SIZE + 3,
},
@@ -664,10 +600,7 @@ static struct aspath_tests {
-1,
PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 16,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 16,
},
COMMON_ATTR_SIZE + 3,
},
@@ -680,10 +613,7 @@ static struct aspath_tests {
-1,
PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 20,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 20,
},
COMMON_ATTR_SIZE + 3,
},
@@ -696,10 +626,7 @@ static struct aspath_tests {
-1,
PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV,
{
- COMMON_ATTRS,
- BGP_ATTR_FLAG_TRANS,
- BGP_ATTR_AS_PATH,
- 22,
+ COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, BGP_ATTR_AS_PATH, 22,
},
COMMON_ATTR_SIZE + 3,
},
@@ -714,8 +641,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS_PATH,
- 18,
+ BGP_ATTR_AS_PATH, 18,
},
COMMON_ATTR_SIZE + 3,
},
@@ -730,8 +656,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS4_PATH,
- 14,
+ BGP_ATTR_AS4_PATH, 14,
},
COMMON_ATTR_SIZE + 3,
},
@@ -746,8 +671,7 @@ static struct aspath_tests {
{
COMMON_ATTRS,
BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL,
- BGP_ATTR_AS4_PATH,
- 14,
+ BGP_ATTR_AS4_PATH, 14,
},
COMMON_ATTR_SIZE + 3,
&test_segments[0],
@@ -880,13 +804,7 @@ static struct tests {
{NULL,
NULL,
{
- NULL,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
+ NULL, 0, 0, 0, 0, 0, 0,
}},
};
@@ -934,13 +852,7 @@ struct tests reconcile_tests[] = {
{NULL,
NULL,
{
- NULL,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
+ NULL, 0, 0, 0, 0, 0, 0,
}},
};