summaryrefslogtreecommitdiffstats
path: root/tests/py/arp
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-12-29 19:33:44 +0100
committerPhil Sutter <phil@nwl.cc>2021-02-04 01:23:11 +0100
commit8cf50997500978844f6069189d63f2e809a4abed (patch)
treebaadabc1491708eba9202bc0376fffd1529510d7 /tests/py/arp
parent2cfab7a3e10fcb8ec1aeacc2713a24c1f1d71aae (diff)
tests/py: Add a test sanitizer and fix its findings
This is just basic housekeeping: - Remove duplicate tests in any of the *.t files - Remove explicit output if equal to command itself in *.t files - Remove duplicate payload records in any of the *.t.payload* files - Remove stale payload records (for which no commands exist in the respective *.t file - Remove duplicate/stale entries in any of the *.t.json files In some cases, tests were added instead of removing a stale payload record if it fit nicely into the sequence of tests. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/arp')
-rw-r--r--tests/py/arp/arp.t2
-rw-r--r--tests/py/arp/arp.t.json32
-rw-r--r--tests/py/arp/arp.t.payload10
-rw-r--r--tests/py/arp/arp.t.payload.netdev14
4 files changed, 0 insertions, 58 deletions
diff --git a/tests/py/arp/arp.t b/tests/py/arp/arp.t
index 109d01d7..2eee7838 100644
--- a/tests/py/arp/arp.t
+++ b/tests/py/arp/arp.t
@@ -46,7 +46,6 @@ arp operation rreply;ok
arp operation inrequest;ok
arp operation inreply;ok
arp operation nak;ok
-arp operation reply;ok
arp operation != request;ok
arp operation != reply;ok
arp operation != rrequest;ok
@@ -54,7 +53,6 @@ arp operation != rreply;ok
arp operation != inrequest;ok
arp operation != inreply;ok
arp operation != nak;ok
-arp operation != reply;ok
arp saddr ip 1.2.3.4;ok
arp daddr ip 4.3.2.1;ok
diff --git a/tests/py/arp/arp.t.json b/tests/py/arp/arp.t.json
index 8508c170..73224f7e 100644
--- a/tests/py/arp/arp.t.json
+++ b/tests/py/arp/arp.t.json
@@ -693,22 +693,6 @@
}
]
-# arp operation reply
-[
- {
- "match": {
- "left": {
- "payload": {
- "field": "operation",
- "protocol": "arp"
- }
- },
- "op": "==",
- "right": "reply"
- }
- }
-]
-
# arp operation != request
[
{
@@ -821,22 +805,6 @@
}
]
-# arp operation != reply
-[
- {
- "match": {
- "left": {
- "payload": {
- "field": "operation",
- "protocol": "arp"
- }
- },
- "op": "!=",
- "right": "reply"
- }
- }
-]
-
# arp saddr ip 1.2.3.4
[
{
diff --git a/tests/py/arp/arp.t.payload b/tests/py/arp/arp.t.payload
index f819853f..a95c834e 100644
--- a/tests/py/arp/arp.t.payload
+++ b/tests/py/arp/arp.t.payload
@@ -229,11 +229,6 @@ arp test-arp input
[ payload load 2b @ network header + 6 => reg 1 ]
[ cmp eq reg 1 0x00000a00 ]
-# arp operation reply
-arp test-arp input
- [ payload load 2b @ network header + 6 => reg 1 ]
- [ cmp eq reg 1 0x00000200 ]
-
# arp operation != request
arp test-arp input
[ payload load 2b @ network header + 6 => reg 1 ]
@@ -269,11 +264,6 @@ arp test-arp input
[ payload load 2b @ network header + 6 => reg 1 ]
[ cmp neq reg 1 0x00000a00 ]
-# arp operation != reply
-arp test-arp input
- [ payload load 2b @ network header + 6 => reg 1 ]
- [ cmp neq reg 1 0x00000200 ]
-
# meta iifname "invalid" arp ptype 0x0800 arp htype 1 arp hlen 6 arp plen 4 @nh,192,32 0xc0a88f10 @nh,144,48 set 0x112233445566
arp test-arp input
[ meta load iifname => reg 1 ]
diff --git a/tests/py/arp/arp.t.payload.netdev b/tests/py/arp/arp.t.payload.netdev
index f57610cf..ac985a9a 100644
--- a/tests/py/arp/arp.t.payload.netdev
+++ b/tests/py/arp/arp.t.payload.netdev
@@ -303,13 +303,6 @@ netdev test-netdev ingress
[ payload load 2b @ network header + 6 => reg 1 ]
[ cmp eq reg 1 0x00000a00 ]
-# arp operation reply
-netdev test-netdev ingress
- [ meta load protocol => reg 1 ]
- [ cmp eq reg 1 0x00000608 ]
- [ payload load 2b @ network header + 6 => reg 1 ]
- [ cmp eq reg 1 0x00000200 ]
-
# arp operation != request
netdev test-netdev ingress
[ meta load protocol => reg 1 ]
@@ -359,13 +352,6 @@ netdev test-netdev ingress
[ payload load 2b @ network header + 6 => reg 1 ]
[ cmp neq reg 1 0x00000a00 ]
-# arp operation != reply
-netdev test-netdev ingress
- [ meta load protocol => reg 1 ]
- [ cmp eq reg 1 0x00000608 ]
- [ payload load 2b @ network header + 6 => reg 1 ]
- [ cmp neq reg 1 0x00000200 ]
-
# meta iifname "invalid" arp ptype 0x0800 arp htype 1 arp hlen 6 arp plen 4 @nh,192,32 0xc0a88f10 @nh,144,48 set 0x112233445566
netdev test-netdev ingress
[ meta load iifname => reg 1 ]