diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2014-07-06 22:33:48 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-08-18 01:49:17 +0200 |
commit | 8b16ed74fa61523c3348d2584b66a56a8ad4e350 (patch) | |
tree | fe7232f0df942ca8f8bbc386f5089c13d1ec452a /tests | |
parent | bgpd: don't send NOTIFY twice for malformed attrs (diff) | |
download | frr-8b16ed74fa61523c3348d2584b66a56a8ad4e350.tar.xz frr-8b16ed74fa61523c3348d2584b66a56a8ad4e350.zip |
tests/bgpd: don't hardcode error number (fix f57000c)
f57000c ("bgpd: don't send NOTIFY twice for malformed attrs") introduces
BGP_ATTR_PARSE_ERROR_NOTIFYPLS as additional error code that implies the
caller should sent a NOTIFY and convert it to BGP_ATTR_PARSE_ERROR.
Sadly, the latter was hardcoded in bgp_mp_attr_test.c, which now didn't
consider the new value to be an error.
Make the testcase treat all nonzero values as error without discern.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bgp_mp_attr_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c index 177c1ad8d..aa8e485d6 100644 --- a/tests/bgp_mp_attr_test.c +++ b/tests/bgp_mp_attr_test.c @@ -478,7 +478,7 @@ parse_test (struct peer *peer, struct test_segment *t, int type) printf ("parsed?: %s\n", ret ? "no" : "yes"); - if (ret != t->parses) + if ((ret == 0) != (t->parses == 0)) failed++; if (tty) |