summaryrefslogtreecommitdiffstats
path: root/tests/py/any/ct.t.payload
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-09 11:59:39 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-09 11:59:39 +0200
commit71624f25f22b1d750bb532ced75e080b4123fb56 (patch)
tree59bb768cb238ddc096235a377d1ba1aedc065e46 /tests/py/any/ct.t.payload
parent9ef4f9e6fe0c766395d00701131289bc2007c23c (diff)
tests: py: add expires tests with different time bases
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/any/ct.t.payload')
-rw-r--r--tests/py/any/ct.t.payload19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 9f288e79..9338466d 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -226,15 +226,28 @@ ip test-ip4 output
[ immediate reg 1 0x00000011 ]
[ ct set mark with reg 1 ]
-# ct expiration 30
+# ct expiration 30s
ip test-ip4 output
[ ct load expiration => reg 1 ]
[ cmp eq reg 1 0x00007530 ]
-# ct expiration 22
+# ct expiration 30000ms
ip test-ip4 output
[ ct load expiration => reg 1 ]
- [ cmp eq reg 1 0x000055f0 ]
+ [ cmp eq reg 1 0x00007530 ]
+
+# ct expiration 1m-1h
+ip test-ip4 output
+ [ ct load expiration => reg 1 ]
+ [ byteorder reg 1 = hton(reg 1, 4, 4) ]
+ [ cmp gte reg 1 0x60ea0000 ]
+ [ cmp lte reg 1 0x80ee3600 ]
+
+# ct expiration > 4d23h59m59s
+ip test-ip4 output
+ [ ct load expiration => reg 1 ]
+ [ byteorder reg 1 = hton(reg 1, 4, 4) ]
+ [ cmp gt reg 1 0x18c8bf19 ]
# ct expiration != 233
ip test-ip4 output