summaryrefslogtreecommitdiffstats
path: root/tests/py/ip
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-12-09 18:43:16 +0100
committerFlorian Westphal <fw@strlen.de>2020-12-09 18:44:45 +0100
commitb2c73d19cc5ae37e8fb29b01c44124edd0a4e9ea (patch)
treee918a26aba4765e17cf152bdbfc7d7f82d3b98c8 /tests/py/ip
parent2aa0f63aacd31b1a997921e68e87db92ada53fdb (diff)
tests: icmp, icmpv6: check we don't add second dependency
If dependency is already fulfilled, do not add another one. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/ip')
-rw-r--r--tests/py/ip/icmp.t1
-rw-r--r--tests/py/ip/icmp.t.payload.ip12
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/py/ip/icmp.t b/tests/py/ip/icmp.t
index 996e1fc3..c22b55eb 100644
--- a/tests/py/ip/icmp.t
+++ b/tests/py/ip/icmp.t
@@ -60,6 +60,7 @@ icmp sequence != { 33, 55, 67, 88};ok;icmp type { echo-request, echo-reply} icmp
icmp sequence { 33-55};ok;icmp type { echo-request, echo-reply} icmp sequence { 33-55}
icmp sequence != { 33-55};ok;icmp type { echo-request, echo-reply} icmp sequence != { 33-55}
icmp id 1 icmp sequence 2;ok;icmp type { echo-reply, echo-request} icmp id 1 icmp sequence 2
+icmp type { echo-reply, echo-request} icmp id 1 icmp sequence 2;ok
icmp mtu 33;ok
icmp mtu 22-33;ok
diff --git a/tests/py/ip/icmp.t.payload.ip b/tests/py/ip/icmp.t.payload.ip
index e238c4bb..d75d12a0 100644
--- a/tests/py/ip/icmp.t.payload.ip
+++ b/tests/py/ip/icmp.t.payload.ip
@@ -514,6 +514,18 @@ ip
[ payload load 4b @ transport header + 4 => reg 1 ]
[ cmp eq reg 1 0x02000100 ]
+# icmp type { echo-reply, echo-request} icmp id 1 icmp sequence 2
+__set%d test-ip4 3
+__set%d test-ip4 0
+ element 00000000 : 0 [end] element 00000008 : 0 [end]
+ip
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000001 ]
+ [ payload load 1b @ transport header + 0 => reg 1 ]
+ [ lookup reg 1 set __set%d ]
+ [ payload load 4b @ transport header + 4 => reg 1 ]
+ [ cmp eq reg 1 0x02000100 ]
+
# icmp mtu 33
ip test-ip4 input
[ meta load l4proto => reg 1 ]