]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests/bgpd: don't hardcode error number (fix f57000c)
authorDavid Lamparter <equinox@opensourcerouting.org>
Sun, 6 Jul 2014 20:33:48 +0000 (22:33 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 17 Aug 2014 23:49:17 +0000 (01:49 +0200)
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>
tests/bgp_mp_attr_test.c

index 177c1ad8dc82936e74136128cb56c4b24e04c6dc..aa8e485d6e52229d9441ca8059726b9b413e0229 100644 (file)
@@ -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)