START usr.sbin/bgpd/integrationtests 2021-03-28T21:40:07Z ==== network_statement ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/network_statement.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/30 up + ifconfig pair12 rdomain 12 10.12.57.2/30 up + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + echo add routes add routes + route -T 12 add 10.12.58.0/24 10.12.57.1 add net 10.12.58.0/24: gateway 10.12.57.1 + ifconfig pair12 alias 10.12.59.1/24 + route -T 12 add -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1 add net 10.12.60.0/24: gateway 10.12.57.1 + route -T 12 add -priority 55 10.12.61.0/24 10.12.57.1 add net 10.12.61.0/24: gateway 10.12.57.1 + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.network_statement.rdomain1.conf + route -T 12 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.network_statement.rdomain2.conf + sleep 2 + echo test 1 test 1 + route -T 11 exec bgpctl sh rib 10.12.58.0/24 + grep 10.12.58.0/24 *> N 10.12.58.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.59.0/24 + grep 10.12.59.0/24 *> N 10.12.59.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.60.0/24 + grep 10.12.60.0/24 *> N 10.12.60.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.61.0/24 + grep 10.12.61.0/24 *> N 10.12.61.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.62.0/24 + grep 10.12.62.0/24 *> N 10.12.62.0/24 10.12.57.2 100 0 4200000002 i + echo delete routes delete routes + route -T 12 delete 10.12.58.0/24 10.12.57.1 delete net 10.12.58.0/24: gateway 10.12.57.1 + ifconfig pair12 -alias 10.12.59.1 + route -T 12 delete -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1 delete net 10.12.60.0/24: gateway 10.12.57.1 + route -T 12 delete -priority 55 10.12.61.0/24 10.12.57.1 delete net 10.12.61.0/24: gateway 10.12.57.1 + sleep 1 + echo test 2 test 2 + route -T 11 exec bgpctl sh rib 10.12.58.0/24 + grep 10.12.58.0/24 + route -T 11 exec bgpctl sh rib 10.12.59.0/24 + grep 10.12.59.0/24 + route -T 11 exec bgpctl sh rib 10.12.60.0/24 + grep 10.12.60.0/24 + route -T 11 exec bgpctl sh rib 10.12.61.0/24 + grep 10.12.61.0/24 + sleep 1 + echo add routes add routes + route -T 12 add 10.12.58.0/24 10.12.57.1 add net 10.12.58.0/24: gateway 10.12.57.1 + ifconfig pair12 alias 10.12.59.1/24 + route -T 12 add -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1 add net 10.12.60.0/24: gateway 10.12.57.1 + route -T 12 add -priority 55 10.12.61.0/24 10.12.57.1 add net 10.12.61.0/24: gateway 10.12.57.1 + sleep 1 + echo test 3 test 3 + route -T 11 exec bgpctl sh rib 10.12.58.0/24 + grep 10.12.58.0/24 *> N 10.12.58.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.59.0/24 + grep 10.12.59.0/24 *> N 10.12.59.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.60.0/24 + grep 10.12.60.0/24 *> N 10.12.60.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib 10.12.61.0/24 + grep 10.12.61.0/24 *> N 10.12.61.0/24 10.12.57.2 100 0 4200000002 i + exit 0 + error_notify 0 cleanup SUCCESS ==== md5 ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/md5.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/30 up + ifconfig pair12 rdomain 12 10.12.57.2/30 up + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + echo run bgpds run bgpds + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.md5.rdomain1.conf + route -T 12 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.md5.rdomain2.conf + sleep 3 + echo test1 test1 + route -T 11 exec bgpctl sh sum + awk { if ($1 ~ /^RDOMAIN2/) { f=1; print $7; if ($7 == "0") { print "ok"; exit 0; } else { print "no session"; exit 1; } }} END { if (f != 1) { print "bad bgpctl output"; exit 2; }} 0 ok + echo test2 test2 + route -T 12 exec bgpctl sh sum + awk { if ($1 ~ /^RDOMAIN1/) { f=1; print $7; if ($7 == "0") { print "ok"; exit 0; } else { print "no session"; exit 1; } }} END { if (f != 1) { print "bad bgpctl output"; exit 2; }} 0 ok + echo resetting sessions resetting sessions + route -T 11 exec bgpctl neigh RDOMAIN2 clear request processed + sleep 10 + echo test3 test3 + awk { if ($1 ~ /^RDOMAIN2/) { f=1; print $7; if ($7 == "0") { print "ok"; exit 0; } else { print "no session"; exit 1; } }} END { if (f != 1) { print "bad bgpctl output"; exit 2; }} + route -T 11 exec bgpctl sh sum 0 ok + echo test4 test4 + awk { if ($1 ~ /^RDOMAIN1/) { f=1; print $7; if ($7 == "0") { print "ok"; exit 0; } else { print "no session"; exit 1; } }} END { if (f != 1) { print "bad bgpctl output"; exit 2; }} + route -T 12 exec bgpctl sh sum 0 ok + exit 0 + error_notify 0 cleanup SUCCESS ==== ovs ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/ovs.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/30 up + ifconfig pair12 rdomain 12 10.12.57.2/30 up + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + echo add routes add routes + route -T 12 add 10.12.58.0/24 10.12.57.1 add net 10.12.58.0/24: gateway 10.12.57.1 + ifconfig pair12 alias 10.12.59.1/24 + route -T 12 add -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1 add net 10.12.60.0/24: gateway 10.12.57.1 + route -T 12 add -priority 55 10.12.61.0/24 10.12.57.1 add net 10.12.61.0/24: gateway 10.12.57.1 + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.ovs.rdomain1.conf + route -T 12 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.ovs.rdomain2.conf + sleep 2 + echo test 1 test 1 + route -T 11 exec bgpctl sh rib ovs valid + grep 10.12.62.0/24 *> V 10.12.62.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib ovs invalid + grep 10.12.63.0/24 *> ! 10.12.63.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib ovs not-found + grep 10.12.64.0/24 *> N 10.12.64.0/24 10.12.57.2 100 0 4200000002 i + echo reload config reload config + route -T 11 exec bgpctl reload reload request sent. request processed + sleep 2 + echo test 2 test 2 + route -T 11 exec bgpctl sh rib ovs valid + grep 10.12.62.0/24 *> V 10.12.62.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib ovs invalid + grep 10.12.63.0/24 *> ! 10.12.63.0/24 10.12.57.2 100 0 4200000002 i + route -T 11 exec bgpctl sh rib ovs not-found + grep 10.12.64.0/24 *> N 10.12.64.0/24 10.12.57.2 100 0 4200000002 i + exit 0 + error_notify 0 cleanup SUCCESS ==== mrt ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/mrt.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 check if rdomains are busy + echo setup setup + ifconfig mpe11 rdomain 11 mplslabel 42 + ifconfig lo11 inet 127.0.0.1/8 + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.mrt.conf + sleep 2 + pkill -USR1 -T 11 -u 0 bgpd + sleep 2 + echo test table-v2 test table-v2 + bgpctl show mrt detail file mrt-table-v2.mrt + grep -v Last update: + > mrt-table-v2.out + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/mrt-table-v2.ok mrt-table-v2.out + echo test table-mp test table-mp + grep -v Last update: + bgpctl show mrt detail file mrt-table-mp.mrt + > mrt-table-mp.out + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/mrt-table-mp.ok mrt-table-mp.out + echo test table test table + bgpctl show mrt detail file mrt-table.mrt + grep -v Last update: + > mrt-table.out + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/mrt-table.ok mrt-table.out + exit 0 + error_notify 0 SUCCESS ==== maxprefix ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/maxprefix.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/30 up + ifconfig pair12 rdomain 12 10.12.57.2/30 up + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + echo run bgpds run bgpds + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.maxprefix.rdomain1.conf + route -T 12 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.maxprefix.rdomain2.conf + sleep 3 + echo test1: add two networks test1: add two networks + route -T 11 exec bgpctl network add 10.12.58.0/24 request sent. + route -T 11 exec bgpctl network add 10.12.59.0/24 request sent. + sleep 1 + route -T 11 exec bgpctl show nei + awk /^ Prefixes/ { if ($2 == "2") { print "ok"; ok=1; exit 0; } } END { if (ok != 1) { print "bad bgpctl output"; exit 2; } } ok + echo test1: add another network test1: add another network + route -T 11 exec bgpctl network add 10.12.60.0/24 request sent. + sleep 1 + route -T 11 exec bgpctl show nei + grep ^ Last error received: Cease, received max-prefix exceeded Last error received: Cease, received max-prefix exceeded + error_notify 0 cleanup SUCCESS ==== maxprefixout ==== ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/maxprefixout.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/30 up + ifconfig pair12 rdomain 12 10.12.57.2/30 up + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + echo run bgpds run bgpds + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.maxprefixout.rdomain1.conf + route -T 12 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.maxprefixout.rdomain2.conf + sleep 3 + echo test1: add two networks test1: add two networks + route -T 11 exec bgpctl network add 10.12.58.0/24 request sent. + route -T 11 exec bgpctl network add 10.12.59.0/24 request sent. + sleep 1 + route -T 11 exec bgpctl show nei + awk /^ Prefixes/ { if ($2 == "2") { print "ok"; ok=1; exit 0; } } END { if (ok != 1) { print "bad bgpctl output"; exit 2; } } ok + echo test1: add another network test1: add another network + route -T 11 exec bgpctl network add 10.12.60.0/24 request sent. + sleep 1 + route -T 11 exec bgpctl show nei + grep ^ Last error sent: Cease, sent max-prefix exceeded Last error sent: Cease, sent max-prefix exceeded + error_notify 0 cleanup SUCCESS ==== as0 ==== cc -O2 -pipe -MD -MP -o api-exabgp /usr/src/regress/usr.sbin/bgpd/integrationtests/api-exabgp.c sed -e 's|##OBJDIR##|/usr/src/regress/usr.sbin/bgpd/integrationtests/obj|g' /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.as0.test1.in > exabgp.as0.test1.conf || (rm exabgp.as0.test1.conf && exit 1) sed -e 's|##OBJDIR##|/usr/src/regress/usr.sbin/bgpd/integrationtests/obj|g' /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.as0.test2.in > exabgp.as0.test2.conf || (rm exabgp.as0.test2.conf && exit 1) ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/as0.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/29 up + ifconfig pair12 rdomain 12 10.12.57.2/29 up + ifconfig pair12 alias 10.12.57.3/32 + ifconfig pair12 alias 10.12.57.4/32 + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + [ -p as0.fifo ] + mkfifo as0.fifo + echo run bgpd run bgpd + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.as0.conf + sleep 1 + echo test1 test1 + run_exabgp as0.test1 exabgp.as0.test1.conf + > as0.test1.out + 2>&1 + grep -q error[OPEN message error / Bad Peer AS] as0.test1.out + echo OK OK + echo test2 test2 + run_exabgp as0.test2 exabgp.as0.test2.conf + > as0.test2.out + 2>&1 + grep receive update announced as0.test2.out + sort + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.as0.test2.ok /dev/stdin + echo OK OK + exit 0 + error_notify 0 cleanup SUCCESS ==== med ==== sed -e 's|##OBJDIR##|/usr/src/regress/usr.sbin/bgpd/integrationtests/obj|g' /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.in > exabgp.med.conf || (rm exabgp.med.conf && exit 1) ksh /usr/src/regress/usr.sbin/bgpd/integrationtests/med.sh /usr/sbin/bgpd /usr/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 pair12 check if rdomains are busy check if interfaces are busy + echo setup setup + ifconfig pair11 rdomain 11 10.12.57.1/29 up + ifconfig pair12 rdomain 12 10.12.57.2/29 up + ifconfig pair12 alias 10.12.57.3/32 + ifconfig pair12 alias 10.12.57.4/32 + ifconfig pair12 alias 10.12.57.5/32 + ifconfig pair11 patch pair12 + ifconfig lo11 inet 127.0.0.1/8 + ifconfig lo12 inet 127.0.0.1/8 + [ -p med.fifo ] + mkfifo med.fifo + echo run bgpd run bgpd + route -T 11 exec /usr/sbin/bgpd -v -f /usr/src/regress/usr.sbin/bgpd/integrationtests/bgpd.med.conf + sleep 1 + echo run exabgp run exabgp + sleep 2 + run_exabgp med exabgp.med.conf + echo test 1 test 1 + exacmd neighbor 10.12.57.1 router-id 10.12.57.2 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 100 doneneighbor 10.12.57.1 connected neighbor 10.12.57.1 connected neighbor 10.12.57.1 connected neighbor 10.12.57.1 up neighbor 10.12.57.1 up + exacmd neighbor 10.12.57.1 router-id 10.12.57.3 announce route 10.12.1.0/24 next-hop self as-path [ 64502 64510 ] med 100 neighbor 10.12.57.1 up done+ exacmd neighbor 10.12.57.1 router-id 10.12.57.4 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 50 done+ sleep 5 + route -T 11 exec bgpctl sh rib + tee med.out flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale, E = Error origin validation state: N = not-found, V = valid, ! = invalid origin: i = IGP, e = EGP, ? = Incomplete flags ovs destination gateway lpref med aspath origin *> N 10.12.1.0/24 10.12.57.3 100 100 64502 64510 i * N 10.12.1.0/24 10.12.57.4 100 50 64501 64510 i * N 10.12.1.0/24 10.12.57.2 100 100 64501 64510 i + sleep .2 + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok med.out + echo OK OK + exacmd clear adj-rib out all peers done+ echo test 2 test 2 + exacmd neighbor 10.12.57.1 router-id 10.12.57.4 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 50 done+ exacmd neighbor 10.12.57.1 router-id 10.12.57.3 announce route 10.12.1.0/24 next-hop self as-path [ 64502 64510 ] med 100 done+ exacmd neighbor 10.12.57.1 router-id 10.12.57.2 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 100 done+ sleep 5 + route -T 11 exec bgpctl sh rib + tee med.out flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale, E = Error origin validation state: N = not-found, V = valid, ! = invalid origin: i = IGP, e = EGP, ? = Incomplete flags ovs destination gateway lpref med aspath origin *> N 10.12.1.0/24 10.12.57.3 100 100 64502 64510 i * N 10.12.1.0/24 10.12.57.4 100 50 64501 64510 i * N 10.12.1.0/24 10.12.57.2 100 100 64501 64510 i + sleep .2 + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok med.out + echo OK OK + exacmd clear adj-rib out all peers done+ echo test 3 test 3 + exacmd neighbor 10.12.57.1 router-id 10.12.57.2 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 100 done+ exacmd neighbor 10.12.57.1 router-id 10.12.57.4 announce route 10.12.1.0/24 next-hop self as-path [ 64501 64510 ] med 50 done+ exacmd neighbor 10.12.57.1 router-id 10.12.57.3 announce route 10.12.1.0/24 next-hop self as-path [ 64502 64510 ] med 100 done+ sleep 5 + route -T 11 exec bgpctl sh rib + tee med.out flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale, E = Error origin validation state: N = not-found, V = valid, ! = invalid origin: i = IGP, e = EGP, ? = Incomplete flags ovs destination gateway lpref med aspath origin *> N 10.12.1.0/24 10.12.57.3 100 100 64502 64510 i * N 10.12.1.0/24 10.12.57.4 100 50 64501 64510 i * N 10.12.1.0/24 10.12.57.2 100 100 64501 64510 i + sleep .2 + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok med.out + echo OK OK + echo test 4 test 4 + exacmd neighbor 10.12.57.1 router-id 10.12.57.4 withdraw route 10.12.1.0/24 done+ sleep 5 + route -T 11 exec bgpctl sh rib + tee med.out flags: * = Valid, > = Selected, I = via IBGP, A = Announced, S = Stale, E = Error origin validation state: N = not-found, V = valid, ! = invalid origin: i = IGP, e = EGP, ? = Incomplete flags ovs destination gateway lpref med aspath origin *> N 10.12.1.0/24 10.12.57.2 100 100 64501 64510 i * N 10.12.1.0/24 10.12.57.3 100 100 64502 64510 i + sleep .2 + diff -u /usr/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med_2.ok med.out + echo OK OK + exacmd shutdown shutdown in progress doneapi-exabgp: exabgp shutdown + exit 0 + error_notify 0 cleanup SUCCESS PASS usr.sbin/bgpd/integrationtests Duration 1m36.62s