summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-08-05 22:41:40 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-08-05 22:41:40 +0000
commita9a9cd801165005e1a27bdcab3efb2cc2b7173c7 (patch)
tree03b4e8640a0408394aa8766716fabe5a099b4cb7 /sbin
parentf913e84966bf9ef5d334c266f6038696cb74627b (diff)
regress/exchange/README: Merge with EOM 1.1
regress/exchange/mm-1-setup.sh: Merge with EOM 1.1 regress/exchange/mm-i-1.t: Merge with EOM 1.1 regress/exchange/mm-r-1.t: Merge with EOM 1.1 author: niklas New regression test of exchanges, with timed events =============================================================================
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/regress/exchange/README78
-rw-r--r--sbin/isakmpd/regress/exchange/mm-1-setup.sh12
-rw-r--r--sbin/isakmpd/regress/exchange/mm-i-1.t43
-rw-r--r--sbin/isakmpd/regress/exchange/mm-r-1.t42
4 files changed, 175 insertions, 0 deletions
diff --git a/sbin/isakmpd/regress/exchange/README b/sbin/isakmpd/regress/exchange/README
new file mode 100644
index 00000000000..cd1555b09e9
--- /dev/null
+++ b/sbin/isakmpd/regress/exchange/README
@@ -0,0 +1,78 @@
+$OpenBSD: README,v 1.1 1999/08/05 22:41:39 niklas Exp $
+$EOM: README,v 1.1 1999/08/05 15:07:37 niklas Exp $
+
+XXX The old run.sh test-framework is obsoleted, it will go away anyday.
+
+We wanted to do a regression test environment which was flexible
+enough to be able to easily reproduce anomalies in isakmpd. It
+turns out this is not easy to do, as many problems are timing related.
+
+Currently ticks are milliseconds. An idea is to try to measure
+isakmpd's response time somehow, and use that time as some kind of
+basis for a tick.
+
+Our test environment should be able to parse scripts like this:
+
+#Tick Action Format Data
+0 send H* ffffffff
+0 recv H* 00000000
+1000 send H* deadbeef
+
+Ticks are not absolute but relative to the last event. the format is
+Perl's pack/unpack template formats. Data is in the given format with
+one exception, spaces are ignored, newlines are end-of-data unless
+preceeded by a backslash.
+
+Comments are lines with a numbersign as the first non-whitespace
+character. Empty lines are ignored, unless inside a multi-line data
+in which it will be part of the data buffer.
+
+Here is a real world example:
+
+# $RCSId$
+
+# Initiate a MM
+0 send H* ad9de636 f12460bb 00000000 00000000 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+400 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+110 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 60a8c102 ce97687e 45e3fdd9 6fd586b4 \
+ f3a91167 559dd214 a78d678e 2772b7b2 83267487 15ec02a9 \
+ 419b77ee 0f2add09 e9e09b7d ad40c883 ef2039c9 c59b67ff \
+ 56e4d6f8 c99d47cb d4a565bc 8d192f76 f695d243 09121df5 \
+ 524884a7 3f702630 7f4fad44 e222c4b1 242fd1cd ca3a161d \
+ bcdf6706 025cc90d c4b00ef9 bee5ada2 00000014 ff7c493c \
+ 88e68a10 4ab19a6a 7e75c771
+
+800 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 681b9859 7680a3ff 894bb982 ef924bc8 \
+ 4d9c7ebf 3a92db7b bcfe68f7 6e1de327 a975293f f5c550b1 \
+ 9c69d6ed 64f201ec 514f4f44 0e6242b9 df4917e6 4418212d \
+ 66a66eb1 f3b70c2d 4e14e382 d42ebe04 1027957c 5dadcaf1 \
+ a531c085 6cee739f 433c185c 12a8a946 88622f66 f211783c \
+ 277e134d 22d8e809 f1d38bab 6ca2a35f 00000014 6a917048 \
+ a406fd47 b3d16554 cd6f0967
+
+140 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 0000005c d6571dec a8b55acb 1069210c 7d195417 1c2738e9 \
+ 42f1d9a3 8561d0ec 0697cd06 ac1beb19 1dc8acf5 904ec1d5 \
+ 5b2b154e 38b0de90 4f2e1f71 083047ca 10cab3d5
+
+900 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 00000044 b46b1db4 9ecfbfa6 a5e9baa2 8eb3cb68 be3a857c \
+ b039fa72 d595e69f 03669dbd 350781e2 56c36dce
+
+run with:
+
+perl run.pl filename
+
+You need to have an isakmpd listening on the address which is given in
+run.pl. Of course you need to run it in deterministic mode (-r).
+There will be a better explanation soon.
diff --git a/sbin/isakmpd/regress/exchange/mm-1-setup.sh b/sbin/isakmpd/regress/exchange/mm-1-setup.sh
new file mode 100644
index 00000000000..4012b16c48e
--- /dev/null
+++ b/sbin/isakmpd/regress/exchange/mm-1-setup.sh
@@ -0,0 +1,12 @@
+# $OpenBSD: mm-1-setup.sh,v 1.1 1999/08/05 22:41:39 niklas Exp $
+# $EOM: mm-1-setup.sh,v 1.1 1999/08/05 15:07:37 niklas Exp $
+
+# XXX Need to start isakmpd here i n a nice way.
+
+echo "C set [Phase 1]:127.0.0.1=localhost 1">/tmp/fifo
+echo "C set [localhost]:phase=1 1">/tmp/fifo
+echo "C set [localhost]:transport=udp 1">/tmp/fifo
+echo "C set [localhost]:address=127.0.0.1 1">/tmp/fifo
+echo "C set [localhost]:port=1501 1">/tmp/fifo
+echo "C set [localhost]:configuration=default-main-mode 1">/tmp/fifo
+echo "C set [localhost]:authentication=mekmitasdigoat 1">/tmp/fifo
diff --git a/sbin/isakmpd/regress/exchange/mm-i-1.t b/sbin/isakmpd/regress/exchange/mm-i-1.t
new file mode 100644
index 00000000000..9f9b1be802f
--- /dev/null
+++ b/sbin/isakmpd/regress/exchange/mm-i-1.t
@@ -0,0 +1,43 @@
+# $OpenBSD: mm-i-1.t,v 1.1 1999/08/05 22:41:39 niklas Exp $
+# $EOM: mm-i-1.t,v 1.1 1999/08/05 15:07:38 niklas Exp $
+
+# The seed to isakmpd was 19990805
+
+# Initiate a MM
+0 send H* ad9de636 f12460bb 00000000 00000000 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+400 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+110 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 60a8c102 ce97687e 45e3fdd9 6fd586b4 \
+ f3a91167 559dd214 a78d678e 2772b7b2 83267487 15ec02a9 \
+ 419b77ee 0f2add09 e9e09b7d ad40c883 ef2039c9 c59b67ff \
+ 56e4d6f8 c99d47cb d4a565bc 8d192f76 f695d243 09121df5 \
+ 524884a7 3f702630 7f4fad44 e222c4b1 242fd1cd ca3a161d \
+ bcdf6706 025cc90d c4b00ef9 bee5ada2 00000014 ff7c493c \
+ 88e68a10 4ab19a6a 7e75c771
+
+800 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 681b9859 7680a3ff 894bb982 ef924bc8 \
+ 4d9c7ebf 3a92db7b bcfe68f7 6e1de327 a975293f f5c550b1 \
+ 9c69d6ed 64f201ec 514f4f44 0e6242b9 df4917e6 4418212d \
+ 66a66eb1 f3b70c2d 4e14e382 d42ebe04 1027957c 5dadcaf1 \
+ a531c085 6cee739f 433c185c 12a8a946 88622f66 f211783c \
+ 277e134d 22d8e809 f1d38bab 6ca2a35f 00000014 6a917048 \
+ a406fd47 b3d16554 cd6f0967
+
+140 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 0000005c d6571dec a8b55acb 1069210c 7d195417 1c2738e9 \
+ 42f1d9a3 8561d0ec 0697cd06 ac1beb19 1dc8acf5 904ec1d5 \
+ 5b2b154e 38b0de90 4f2e1f71 083047ca 10cab3d5
+
+900 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 00000044 b46b1db4 9ecfbfa6 a5e9baa2 8eb3cb68 be3a857c \
+ b039fa72 d595e69f 03669dbd 350781e2 56c36dce
+
diff --git a/sbin/isakmpd/regress/exchange/mm-r-1.t b/sbin/isakmpd/regress/exchange/mm-r-1.t
new file mode 100644
index 00000000000..0c48224b06f
--- /dev/null
+++ b/sbin/isakmpd/regress/exchange/mm-r-1.t
@@ -0,0 +1,42 @@
+# $OpenBSD: mm-r-1.t,v 1.1 1999/08/05 22:41:39 niklas Exp $
+# $EOM: mm-r-1.t,v 1.1 1999/08/05 15:07:38 niklas Exp $
+
+# The seed to isakmpd was 19990805
+
+# Respond to this MM
+999999 recv H* ad9de636 f12460bb 00000000 00000000 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+40 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 01100200 00000000 \
+ 00000050 00000034 00000001 00000001 00000028 01010001 \
+ 00000020 00010000 80010005 80020002 80030001 80040002 \
+ 800b0001 800c0258
+
+1100 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 60a8c102 ce97687e 45e3fdd9 6fd586b4 \
+ f3a91167 559dd214 a78d678e 2772b7b2 83267487 15ec02a9 \
+ 419b77ee 0f2add09 e9e09b7d ad40c883 ef2039c9 c59b67ff \
+ 56e4d6f8 c99d47cb d4a565bc 8d192f76 f695d243 09121df5 \
+ 524884a7 3f702630 7f4fad44 e222c4b1 242fd1cd ca3a161d \
+ bcdf6706 025cc90d c4b00ef9 bee5ada2 00000014 ff7c493c \
+ 88e68a10 4ab19a6a 7e75c771
+
+80 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 04100200 00000000 \
+ 000000b4 0a000084 681b9859 7680a3ff 894bb982 ef924bc8 \
+ 4d9c7ebf 3a92db7b bcfe68f7 6e1de327 a975293f f5c550b1 \
+ 9c69d6ed 64f201ec 514f4f44 0e6242b9 df4917e6 4418212d \
+ 66a66eb1 f3b70c2d 4e14e382 d42ebe04 1027957c 5dadcaf1 \
+ a531c085 6cee739f 433c185c 12a8a946 88622f66 f211783c \
+ 277e134d 22d8e809 f1d38bab 6ca2a35f 00000014 6a917048 \
+ a406fd47 b3d16554 cd6f0967
+
+1400 recv H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 0000005c d6571dec a8b55acb 1069210c 7d195417 1c2738e9 \
+ 42f1d9a3 8561d0ec 0697cd06 ac1beb19 1dc8acf5 904ec1d5 \
+ 5b2b154e 38b0de90 4f2e1f71 083047ca 10cab3d5
+
+90 send H* ad9de636 f12460bb 2aa5a583 ab2f3980 05100201 00000000 \
+ 00000044 b46b1db4 9ecfbfa6 a5e9baa2 8eb3cb68 be3a857c \
+ b039fa72 d595e69f 03669dbd 350781e2 56c36dce