diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-23 08:58:33 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-23 08:58:33 +0000 |
commit | 5dbca08871b122a612aaf1efb83c2e9f090a7f12 (patch) | |
tree | 84023e72a3996472dc785ee756800010d16803b4 /regress/usr.sbin/arp | |
parent | ac38332d5c2abfc8f07af547711c4108a8875a62 (diff) |
arp(8) regression tests, some of which are currently failing with ART.
Diffstat (limited to 'regress/usr.sbin/arp')
-rw-r--r-- | regress/usr.sbin/arp/Makefile | 78 | ||||
-rw-r--r-- | regress/usr.sbin/arp/arptest1.ok | 4 | ||||
-rw-r--r-- | regress/usr.sbin/arp/arptest2.ok | 4 | ||||
-rw-r--r-- | regress/usr.sbin/arp/arptest3.ok | 3 | ||||
-rw-r--r-- | regress/usr.sbin/arp/arptest4.ok | 3 | ||||
-rw-r--r-- | regress/usr.sbin/arp/arptest5.ok | 3 |
6 files changed, 95 insertions, 0 deletions
diff --git a/regress/usr.sbin/arp/Makefile b/regress/usr.sbin/arp/Makefile new file mode 100644 index 00000000000..51618880181 --- /dev/null +++ b/regress/usr.sbin/arp/Makefile @@ -0,0 +1,78 @@ +# $OpenBSD: Makefile,v 1.1 2016/03/23 08:58:32 mpi Exp $ + +RDOMAIN?= 5 +VETHER_MAC= fe:e1:ba:d2:a3:18 +PRIV_MAC= 00:90:27:bb:cc:dd +PUB_MAC= fe:88:33:11:bb:aa + +.MAIN: all + +.ifmake !obj && !clean && !cleandir && !depend && !regress +.if (${.TARGET} != all && ! make(all)) || (${.TARGET} == all) + +.SILENT: .BEGIN .END .INTERRUPT + +.BEGIN: + -${SUDO} ifconfig vether10001 up lladdr ${VETHER_MAC} \ + rdomain ${RDOMAIN} 192.0.2.1/24 + +.END: + -${SUDO} ifconfig vether10001 destroy + +.INTERRUPT: + -${SUDO} ifconfig vether10001 destroy + +.endif +.endif + +ARP= ${SUDO} arp -n -V ${RDOMAIN} + +# Two entries to the same destination are ok if one is "pub" +n= 1 +RTTEST_TARGETS+:=arptest${n} +arptest${n}: + ${ARP} -s 192.0.2.42 ${PRIV_MAC} + ${ARP} -s 192.0.2.42 ${PUB_MAC} pub + ${ARP} -a 2>&1| \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +# Insert the "pub" entry first, it should not matter +n= 2 +RTTEST_TARGETS+:=arptest${n} +arptest${n}: + ${ARP} -s 192.0.2.42 ${PUB_MAC} pub + ${ARP} -s 192.0.2.42 ${PRIV_MAC} + ${ARP} -a 2>&1| \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +# Not specifying "pub" should generate an error +n= 3 +RTTEST_TARGETS+:=arptest${n} +arptest${n}: + ${ARP} -s 192.0.2.42 ${PRIV_MAC} + ${ARP} -s 192.0.2.42 ${PUB_MAC} && exit 1 || exit 0 + ${ARP} -a 2>&1| \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +# Not specifying "pub" works only if "-F" is specified +n= 4 +RTTEST_TARGETS+:=arptest${n} +arptest${n}: + ${ARP} -s 192.0.2.42 ${PRIV_MAC} + ${ARP} -Fs 192.0.2.42 ${PUB_MAC} + ${ARP} -a 2>&1 | \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +# Test that "permanent" entries are correctly created +n= 5 +RTTEST_TARGETS+:=arptest${n} +arptest${n}: + ${ARP} -s 192.0.2.42 ${PRIV_MAC} "permanent" + ${ARP} -a 2>&1 | \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +REGRESS_TARGETS=${RTTEST_TARGETS} +REGRESS_ROOT_TARGETS=${REGRESS_TARGETS} +.PHONY: ${REGRESS_TARGETS} + +.include <bsd.regress.mk> diff --git a/regress/usr.sbin/arp/arptest1.ok b/regress/usr.sbin/arp/arptest1.ok new file mode 100644 index 00000000000..6891b513d99 --- /dev/null +++ b/regress/usr.sbin/arp/arptest1.ok @@ -0,0 +1,4 @@ +Host Ethernet Address Netif Expire Flags +192.0.2.1 fe:e1:ba:d2:a3:18 vether10001 permanent l +192.0.2.42 00:90:27:bb:cc:dd vether10001 static +192.0.2.42 fe:88:33:11:bb:aa vether10001 static p diff --git a/regress/usr.sbin/arp/arptest2.ok b/regress/usr.sbin/arp/arptest2.ok new file mode 100644 index 00000000000..6891b513d99 --- /dev/null +++ b/regress/usr.sbin/arp/arptest2.ok @@ -0,0 +1,4 @@ +Host Ethernet Address Netif Expire Flags +192.0.2.1 fe:e1:ba:d2:a3:18 vether10001 permanent l +192.0.2.42 00:90:27:bb:cc:dd vether10001 static +192.0.2.42 fe:88:33:11:bb:aa vether10001 static p diff --git a/regress/usr.sbin/arp/arptest3.ok b/regress/usr.sbin/arp/arptest3.ok new file mode 100644 index 00000000000..44641aa06d7 --- /dev/null +++ b/regress/usr.sbin/arp/arptest3.ok @@ -0,0 +1,3 @@ +Host Ethernet Address Netif Expire Flags +192.0.2.1 fe:e1:ba:d2:a3:18 vether10001 permanent l +192.0.2.42 00:90:27:bb:cc:dd vether10001 static diff --git a/regress/usr.sbin/arp/arptest4.ok b/regress/usr.sbin/arp/arptest4.ok new file mode 100644 index 00000000000..9f036239445 --- /dev/null +++ b/regress/usr.sbin/arp/arptest4.ok @@ -0,0 +1,3 @@ +Host Ethernet Address Netif Expire Flags +192.0.2.1 fe:e1:ba:d2:a3:18 vether10001 permanent l +192.0.2.42 fe:88:33:11:bb:aa vether10001 static diff --git a/regress/usr.sbin/arp/arptest5.ok b/regress/usr.sbin/arp/arptest5.ok new file mode 100644 index 00000000000..0373be03a66 --- /dev/null +++ b/regress/usr.sbin/arp/arptest5.ok @@ -0,0 +1,3 @@ +Host Ethernet Address Netif Expire Flags +192.0.2.1 fe:e1:ba:d2:a3:18 vether10001 permanent l +192.0.2.42 00:90:27:bb:cc:dd vether10001 permanent |