summaryrefslogtreecommitdiff
path: root/regress/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-09-05 12:54:01 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-09-05 12:54:01 +0000
commit45c982adbe807c9e199b9fc95ca397e9694f36d2 (patch)
tree17ad402d0082aa774604b99d341e5609ab937377 /regress/sys
parent255718bfa735da8197931ef873b8e7283ba1b9e4 (diff)
Name environment variables consistently.
Diffstat (limited to 'regress/sys')
-rw-r--r--regress/sys/netinet/arp/Makefile34
-rw-r--r--regress/sys/netinet/arp/README4
-rw-r--r--regress/sys/netinet/arp/arp_otherfake.py2
-rw-r--r--regress/sys/netinet/arp/arp_otherproxy.py2
4 files changed, 21 insertions, 21 deletions
diff --git a/regress/sys/netinet/arp/Makefile b/regress/sys/netinet/arp/Makefile
index 946f0e40089..8f3c82ae9a3 100644
--- a/regress/sys/netinet/arp/Makefile
+++ b/regress/sys/netinet/arp/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2019/05/10 02:22:34 bluhm Exp $
+# $OpenBSD: Makefile,v 1.12 2019/09/05 12:54:00 bluhm Exp $
# The following ports must be installed:
#
@@ -17,7 +17,7 @@ regress:
# REMOTE is running OpenBSD with ARP to test the Address Resolution Protocol.
# FAKE is an non existing machine, its IP is used in the tests.
# OTHER is an IP on REMOTE, but configured on another interface.
-# OTHERFAKE is an non existing IP on another interface.
+# OTHER_FAKE is an non existing IP on another interface.
# REMOTE_SSH is the hostname to log in on the REMOTE machine.
# Configure Addresses on the machines.
@@ -34,16 +34,16 @@ LOCAL_ADDR ?= 10.188.70.17
REMOTE_ADDR ?= 10.188.70.70
FAKE_ADDR ?= 10.188.70.188
OTHER_ADDR ?= 10.188.211.70
-OTHERFAKE_ADDR ?= 10.188.211.188
+OTHER_FAKE_ADDR ?= 10.188.211.188
.if empty (LOCAL_IF) || empty (LOCAL_MAC) || empty (REMOTE_MAC) || \
empty (FAKE_MAC) || empty (REMOTE_SSH) || empty (LOCAL_ADDR) || \
empty (REMOTE_ADDR) || empty (FAKE_ADDR) || empty (OTHER_ADDR) || \
- empty (OTHERFAKE_ADDR)
+ empty (OTHER_FAKE_ADDR)
regress:
@echo this tests needs a remote machine to operate on
@echo LOCAL_IF LOCAL_MAC REMOTE_MAC FAKE_MAC REMOTE_SSH LOCAL_ADDR
- @echo REMOTE_ADDR FAKE_ADDR OTHER_ADDR OTHERFAKE_ADDR are empty
+ @echo REMOTE_ADDR FAKE_ADDR OTHER_ADDR OTHER_FAKE_ADDR are empty
@echo fill out these variables for additional tests
@echo SKIPPED
.endif
@@ -64,7 +64,7 @@ addr.py: Makefile
.for var in LOCAL REMOTE FAKE
echo '${var}_MAC = "${${var}_MAC}"' >>$@.tmp
.endfor
-.for var in LOCAL REMOTE FAKE OTHER OTHERFAKE
+.for var in LOCAL REMOTE FAKE OTHER OTHER_FAKE
echo '${var}_ADDR = "${${var}_ADDR}"' >>$@.tmp
.endfor
mv $@.tmp $@
@@ -241,15 +241,15 @@ run-arp-temporary: addr.py
@echo '\n======== $@ ========'
@echo Send ARP Request to change temporary entry on other interface
ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} temp
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHER_FAKE_ADDR} ${FAKE_MAC} temp
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_otherfake.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHER_FAKE_ADDR}
diff old.log new.log | grep '^> ' >diff.log
- grep 'bsd: arp: attempt to overwrite entry for ${OTHERFAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
- grep '^${OTHERFAKE_ADDR} .* ${FAKE_MAC} ' arp.log
+ grep 'bsd: arp: attempt to overwrite entry for ${OTHER_FAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
+ grep '^${OTHER_FAKE_ADDR} .* ${FAKE_MAC} ' arp.log
# The remote machine has a second address on another interface. Create
# an incomplete ARP entry for a fake address in this network on the
@@ -263,15 +263,15 @@ run-arp-incomplete: addr.py
@echo '\n======== $@ ========'
@echo Send ARP Request filling an incomplete entry on other interface
ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh ${REMOTE_SSH} ${SUDO} ping -n -w 1 -c 1 ${OTHERFAKE_ADDR} || true
+ ssh ${REMOTE_SSH} ${SUDO} ping -n -w 1 -c 1 ${OTHER_FAKE_ADDR} || true
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_otherfake.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHER_FAKE_ADDR}
diff old.log new.log | grep '^> ' >diff.log
- grep 'bsd: arp: attempt to add entry for ${OTHERFAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
- grep '^${OTHERFAKE_ADDR} .* (incomplete) ' arp.log
+ grep 'bsd: arp: attempt to add entry for ${OTHER_FAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
+ grep '^${OTHER_FAKE_ADDR} .* (incomplete) ' arp.log
# Publish a proxy ARP entry on the remote machine for a fake address.
# The local machine requests this IP as a the target.
@@ -313,11 +313,11 @@ REGRESS_TARGETS += run-arp-otherproxy
run-arp-otherproxy: addr.py
@echo '\n======== $@ ========'
@echo Send ARP Request for address proxied on another interface
- ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} pub
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHER_FAKE_ADDR} ${FAKE_MAC} pub
${SUDO} ${PYTHON}arp_otherproxy.py
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
- grep '^${OTHERFAKE_ADDR} .* ${FAKE_MAC} .* static * p$$' arp.log
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHER_FAKE_ADDR}
+ grep '^${OTHER_FAKE_ADDR} .* ${FAKE_MAC} .* static * p$$' arp.log
CLEANFILES += addr.py *.pyc *.log
diff --git a/regress/sys/netinet/arp/README b/regress/sys/netinet/arp/README
index 95d5a656f6d..b0fa00a72fa 100644
--- a/regress/sys/netinet/arp/README
+++ b/regress/sys/netinet/arp/README
@@ -57,7 +57,7 @@ LOCAL_ADDR=10.188.70.17
REMOTE_ADDR=10.188.70.70
FAKE_ADDR=10.188.70.188
OTHER_ADDR=10.188.211.70
-OTHERFAKE_ADDR=10.188.211.188
+OTHER_FAKE_ADDR=10.188.211.188
export LOCAL_IF LOCAL_MAC REMOTE_MAC FAKE_MAC REMOTE_SSH LOCAL_ADDR REMOTE_ADDR
-export FAKE_ADDR OTHER_ADDR OTHERFAKE_ADDR
+export FAKE_ADDR OTHER_ADDR OTHER_FAKE_ADDR
diff --git a/regress/sys/netinet/arp/arp_otherfake.py b/regress/sys/netinet/arp/arp_otherfake.py
index 9b620ef14b8..de299b1caca 100644
--- a/regress/sys/netinet/arp/arp_otherfake.py
+++ b/regress/sys/netinet/arp/arp_otherfake.py
@@ -6,7 +6,7 @@ import os
from addr import *
from scapy.all import *
-arp=ARP(op='who-has', hwsrc=LOCAL_MAC, psrc=OTHERFAKE_ADDR,
+arp=ARP(op='who-has', hwsrc=LOCAL_MAC, psrc=OTHER_FAKE_ADDR,
hwdst="ff:ff:ff:ff:ff:ff", pdst=REMOTE_ADDR)
eth=Ether(src=LOCAL_MAC, dst="ff:ff:ff:ff:ff:ff")/arp
diff --git a/regress/sys/netinet/arp/arp_otherproxy.py b/regress/sys/netinet/arp/arp_otherproxy.py
index 958334c5099..0d43f3212bb 100644
--- a/regress/sys/netinet/arp/arp_otherproxy.py
+++ b/regress/sys/netinet/arp/arp_otherproxy.py
@@ -7,7 +7,7 @@ from addr import *
from scapy.all import *
arp=ARP(op='who-has', hwsrc=LOCAL_MAC, psrc=LOCAL_ADDR,
- hwdst="ff:ff:ff:ff:ff:ff", pdst=OTHERFAKE_ADDR)
+ hwdst="ff:ff:ff:ff:ff:ff", pdst=OTHER_FAKE_ADDR)
eth=Ether(src=LOCAL_MAC, dst="ff:ff:ff:ff:ff:ff")/arp
e=srp1(eth, iface=LOCAL_IF, timeout=2)