summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/test_typelist.h16
-rw-r--r--tests/topotests/bfd-topo2/r1/ipv4_routes.json6
-rw-r--r--tests/topotests/bfd-topo2/r1/ipv6_routes.json6
-rw-r--r--tests/topotests/bfd-topo2/r2/ipv4_routes.json10
-rw-r--r--tests/topotests/bfd-topo2/r2/ipv6_routes.json6
-rw-r--r--tests/topotests/bfd-topo2/r3/ipv4_routes.json8
-rw-r--r--tests/topotests/bfd-topo2/r4/ipv4_routes.json2
-rw-r--r--tests/topotests/bfd-topo2/r4/ipv6_routes.json6
-rwxr-xr-xtests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py7
-rw-r--r--tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json4
-rw-r--r--tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json4
-rw-r--r--tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json4
-rw-r--r--tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json2
13 files changed, 39 insertions, 42 deletions
diff --git a/tests/lib/test_typelist.h b/tests/lib/test_typelist.h
index b288f0bd8e..7ff210cae3 100644
--- a/tests/lib/test_typelist.h
+++ b/tests/lib/test_typelist.h
@@ -209,7 +209,7 @@ static void concat(test_, TYPE)(void)
assert(list_add(&head, &dummy) == &itm[j]);
else {
assert(list_add(&head, &dummy) == NULL);
- list_del(&head, &dummy);
+ assert(list_del(&head, &dummy) != NULL);
}
}
ts_hashx("add-dup", "a538546a6e6ab0484e925940aa8dd02fd934408bbaed8cb66a0721841584d838");
@@ -255,7 +255,7 @@ static void concat(test_, TYPE)(void)
list_first(&head) == &dummy);
} else if (list_next(&head, &dummy))
assert(list_next(&head, &dummy)->val > j);
- list_del(&head, &dummy);
+ assert(list_del(&head, &dummy) != NULL);
}
ts_hash("add-dup+find_{lt,gteq}", "a538546a6e6ab0484e925940aa8dd02fd934408bbaed8cb66a0721841584d838");
#endif
@@ -295,7 +295,7 @@ static void concat(test_, TYPE)(void)
(void)prng_rand(prng);
j = prng_rand(prng) % NITEM;
if (itm[j].scratchpad == 1) {
- list_del(&head, &itm[j]);
+ assert(list_del(&head, &itm[j]) != NULL);
itm[j].scratchpad = 0;
l++;
}
@@ -307,7 +307,7 @@ static void concat(test_, TYPE)(void)
assert(item->scratchpad != 0);
if (item->val & 1) {
- list_del(&head, item);
+ assert(list_del(&head, item) != NULL);
item->scratchpad = 0;
l++;
}
@@ -333,7 +333,7 @@ static void concat(test_, TYPE)(void)
for (i = 0; i < NITEM / 2; i++) {
j = prng_rand(prng) % NITEM;
if (itm[j].scratchpad == 1) {
- list_del(&head, &itm[j]);
+ assert(list_del(&head, &itm[j]) != NULL);
itm[j].scratchpad = 0;
k--;
}
@@ -371,7 +371,7 @@ static void concat(test_, TYPE)(void)
for (i = 0; i < NITEM / 2; i++) {
j = prng_rand(prng) % NITEM;
if (itm[j].scratchpad == 1) {
- list_del(&head, &itm[j]);
+ assert(list_del(&head, &itm[j]) != NULL);
itm[j].scratchpad = 0;
k--;
}
@@ -424,7 +424,7 @@ static void concat(test_, TYPE)(void)
item = &itm[j];
if (item->scratchpad == 0)
continue;
- list_del(&head, item);
+ assert(list_del(&head, item) != NULL);
}
item->scratchpad = 0;
k--;
@@ -469,7 +469,7 @@ static void concat(test_, TYPE)(void)
item = &itm[j];
if (item->scratchpad == 0)
continue;
- list_del(&head, item);
+ assert(list_del(&head, item) != NULL);
}
item->scratchpad = 0;
k--;
diff --git a/tests/topotests/bfd-topo2/r1/ipv4_routes.json b/tests/topotests/bfd-topo2/r1/ipv4_routes.json
index 8a2ec25baa..b0333de410 100644
--- a/tests/topotests/bfd-topo2/r1/ipv4_routes.json
+++ b/tests/topotests/bfd-topo2/r1/ipv4_routes.json
@@ -8,7 +8,7 @@
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
@@ -30,7 +30,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
@@ -52,7 +52,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
diff --git a/tests/topotests/bfd-topo2/r1/ipv6_routes.json b/tests/topotests/bfd-topo2/r1/ipv6_routes.json
index 618853bd42..d09439a8a6 100644
--- a/tests/topotests/bfd-topo2/r1/ipv6_routes.json
+++ b/tests/topotests/bfd-topo2/r1/ipv6_routes.json
@@ -8,7 +8,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
@@ -27,7 +27,7 @@
"protocol": "bgp",
"internalFlags": 0,
"metric": 0,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:1::/64",
"nexthops": [
{
@@ -47,7 +47,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
diff --git a/tests/topotests/bfd-topo2/r2/ipv4_routes.json b/tests/topotests/bfd-topo2/r2/ipv4_routes.json
index b9d8afb430..3c41e13434 100644
--- a/tests/topotests/bfd-topo2/r2/ipv4_routes.json
+++ b/tests/topotests/bfd-topo2/r2/ipv4_routes.json
@@ -5,7 +5,7 @@
"protocol": "ospf",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "10.0.3.0/24",
"nexthops": [
{
@@ -25,7 +25,7 @@
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -47,7 +47,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.3/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r2-eth1",
@@ -70,7 +70,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -92,7 +92,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r2-eth0",
diff --git a/tests/topotests/bfd-topo2/r2/ipv6_routes.json b/tests/topotests/bfd-topo2/r2/ipv6_routes.json
index 004e7588aa..bb45bbae52 100644
--- a/tests/topotests/bfd-topo2/r2/ipv6_routes.json
+++ b/tests/topotests/bfd-topo2/r2/ipv6_routes.json
@@ -5,7 +5,7 @@
"protocol": "ospf6",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:4::/64",
"nexthops": [
{
@@ -25,7 +25,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -47,7 +47,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
diff --git a/tests/topotests/bfd-topo2/r3/ipv4_routes.json b/tests/topotests/bfd-topo2/r3/ipv4_routes.json
index 14dfc692fe..cbf116e687 100644
--- a/tests/topotests/bfd-topo2/r3/ipv4_routes.json
+++ b/tests/topotests/bfd-topo2/r3/ipv4_routes.json
@@ -25,7 +25,7 @@
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -47,7 +47,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.3/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -69,7 +69,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r3-eth0",
@@ -92,7 +92,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r3-eth0",
diff --git a/tests/topotests/bfd-topo2/r4/ipv4_routes.json b/tests/topotests/bfd-topo2/r4/ipv4_routes.json
index ae1e97b017..b06184a44d 100644
--- a/tests/topotests/bfd-topo2/r4/ipv4_routes.json
+++ b/tests/topotests/bfd-topo2/r4/ipv4_routes.json
@@ -8,7 +8,7 @@
"selected": true,
"installed": true,
"prefix": "10.254.254.4/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
diff --git a/tests/topotests/bfd-topo2/r4/ipv6_routes.json b/tests/topotests/bfd-topo2/r4/ipv6_routes.json
index 33608b45aa..a22c90cbba 100644
--- a/tests/topotests/bfd-topo2/r4/ipv6_routes.json
+++ b/tests/topotests/bfd-topo2/r4/ipv6_routes.json
@@ -5,7 +5,7 @@
"protocol": "ospf6",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:4::/64",
"nexthops": [
{
@@ -25,7 +25,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
@@ -47,7 +47,7 @@
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r4-eth0",
diff --git a/tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py b/tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py
index abd6b396d1..2b9c411ff2 100755
--- a/tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py
+++ b/tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py
@@ -218,11 +218,8 @@ def test_next_hop_attribute(request):
# Verifying RIB routes
dut = "r1"
protocol = "bgp"
- result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol)
- try:
- assert result is True
- except AssertionError:
- logger.info("Expected behaviour: %s", result)
+ result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol, expected=False)
+ assert result is not True
# Configure next-hop-self to bgp neighbor
input_dict_1 = {
diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json
index e32c84b7d5..1649ade96d 100644
--- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json
+++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv4_routes.json
@@ -9,7 +9,7 @@
"distance": 20,
"metric": 0,
"installed": true,
- "internalStatus": 34,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
@@ -33,7 +33,7 @@
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json
index 88e8c5cd83..1ca62094bd 100644
--- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json
+++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r1/ipv6_routes.json
@@ -6,7 +6,7 @@
"vrfId":3,
"distance": 20,
"metric": 0,
- "internalStatus": 2,
+ "internalStatus": 0,
"internalFlags": 0,
"nexthops": [
{
@@ -27,7 +27,7 @@
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json
index 9d7c0e6e4f..eda4bed035 100644
--- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json
+++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv4_routes.json
@@ -9,7 +9,7 @@
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
@@ -33,7 +33,7 @@
"distance": 20,
"metric": 0,
"installed": true,
- "internalStatus": 34,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json
index 230fe38748..45c1b76017 100644
--- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json
+++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/r2/ipv6_routes.json
@@ -9,7 +9,7 @@
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{