summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/frag.t.payload.ip6
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2025-10-16 14:31:46 +0200
committerPhil Sutter <phil@nwl.cc>2026-01-27 23:01:54 +0100
commit0f566ac1c1dbd9f2e7d006ca01211aae791f09a8 (patch)
treea672d67eefb7ca5b51550721c9d440bd1845a887 /tests/py/ip6/frag.t.payload.ip6
parentdb82466117b8bfc93923eec49114d47200f7f913 (diff)
tests: py: Update payload records
This is the bulk change of py test suite payload records with improved data reg printing in libnftnl using data (component) size and byteorder collected in nftables. Aside from printing values in the right byte order and padded with zeroes to match their actual size, this patch also exposes the improved set element dump format: * No '[end]' marker, 'element' clearly separates elements * No semi-colon for non-map elements * 'flags' value printed only if non-zero and prefixed by 'flags' to distinguish from element data Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/ip6/frag.t.payload.ip6')
-rw-r--r--tests/py/ip6/frag.t.payload.ip675
1 files changed, 37 insertions, 38 deletions
diff --git a/tests/py/ip6/frag.t.payload.ip6 b/tests/py/ip6/frag.t.payload.ip6
index 0556395a..f3d2dd14 100644
--- a/tests/py/ip6/frag.t.payload.ip6
+++ b/tests/py/ip6/frag.t.payload.ip6
@@ -1,17 +1,17 @@
# frag nexthdr tcp
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
- [ cmp eq reg 1 0x00000006 ]
+ [ cmp eq reg 1 0x06 ]
# frag nexthdr != icmp
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
- [ cmp neq reg 1 0x00000001 ]
+ [ cmp neq reg 1 0x01 ]
# frag nexthdr {esp, ah, comp, udp, udplite, tcp, dccp, sctp}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000032 : 0 [end] element 00000033 : 0 [end] element 0000006c : 0 [end] element 00000011 : 0 [end] element 00000088 : 0 [end] element 00000006 : 0 [end] element 00000021 : 0 [end] element 00000084 : 0 [end]
+ element 32 element 33 element 6c element 11 element 88 element 06 element 21 element 84
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -19,7 +19,7 @@ ip6 test-ip6 output
# frag nexthdr != {esp, ah, comp, udp, udplite, tcp, dccp, sctp}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000032 : 0 [end] element 00000033 : 0 [end] element 0000006c : 0 [end] element 00000011 : 0 [end] element 00000088 : 0 [end] element 00000006 : 0 [end] element 00000021 : 0 [end] element 00000084 : 0 [end]
+ element 32 element 33 element 6c element 11 element 88 element 06 element 21 element 84
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -27,37 +27,37 @@ ip6 test-ip6 output
# frag nexthdr esp
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
- [ cmp eq reg 1 0x00000032 ]
+ [ cmp eq reg 1 0x32 ]
# frag nexthdr ah
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 0 => reg 1 ]
- [ cmp eq reg 1 0x00000033 ]
+ [ cmp eq reg 1 0x33 ]
# frag reserved 22
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
- [ cmp eq reg 1 0x00000016 ]
+ [ cmp eq reg 1 0x16 ]
# frag reserved != 233
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
- [ cmp neq reg 1 0x000000e9 ]
+ [ cmp neq reg 1 0xe9 ]
# frag reserved 33-45
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
- [ range eq reg 1 0x00000021 0x0000002d ]
+ [ range eq reg 1 0x21 0x2d ]
# frag reserved != 33-45
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
- [ range neq reg 1 0x00000021 0x0000002d ]
+ [ range neq reg 1 0x21 0x2d ]
# frag reserved { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 21 element 37 element 43 element 58
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -65,7 +65,7 @@ ip6 test-ip6 output
# frag reserved != { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ element 21 element 37 element 43 element 58
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 1 => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -73,74 +73,74 @@ ip6 test-ip6 output
# frag frag-off 22
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x0000b000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
+ [ cmp eq reg 1 0x00b0 ]
# frag frag-off != 233
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
- [ cmp neq reg 1 0x00004807 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
+ [ cmp neq reg 1 0x0748 ]
# frag frag-off 33-45
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
- [ range eq reg 1 0x00000801 0x00006801 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
+ [ range eq reg 1 0x0108 0x0168 ]
# frag frag-off != 33-45
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
- [ range neq reg 1 0x00000801 0x00006801 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
+ [ range neq reg 1 0x0108 0x0168 ]
# frag frag-off { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000801 : 0 [end] element 0000b801 : 0 [end] element 00001802 : 0 [end] element 0000c002 : 0 [end]
+ element 0108 element 01b8 element 0218 element 02c0
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
[ lookup reg 1 set __set%d ]
# frag frag-off != { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 00000801 : 0 [end] element 0000b801 : 0 [end] element 00001802 : 0 [end] element 0000c002 : 0 [end]
+ element 0108 element 01b8 element 0218 element 02c0
ip6 test-ip6 output
[ exthdr load ipv6 2b @ 44 + 2 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x0000f8ff ) ^ 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0xfff8 ) ^ 0x0000 ]
[ lookup reg 1 set __set%d 0x1 ]
# frag id 1
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
- [ cmp eq reg 1 0x01000000 ]
+ [ cmp eq reg 1 0x00000001 ]
# frag id 22
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
- [ cmp eq reg 1 0x16000000 ]
+ [ cmp eq reg 1 0x00000016 ]
# frag id != 33
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
- [ cmp neq reg 1 0x21000000 ]
+ [ cmp neq reg 1 0x00000021 ]
# frag id 33-45
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
- [ range eq reg 1 0x21000000 0x2d000000 ]
+ [ range eq reg 1 0x00000021 0x0000002d ]
# frag id != 33-45
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
- [ range neq reg 1 0x21000000 0x2d000000 ]
+ [ range neq reg 1 0x00000021 0x0000002d ]
# frag id { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 21000000 : 0 [end] element 37000000 : 0 [end] element 43000000 : 0 [end] element 58000000 : 0 [end]
+ element 00000021 element 00000037 element 00000043 element 00000058
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
[ lookup reg 1 set __set%d ]
@@ -148,7 +148,7 @@ ip6 test-ip6 output
# frag id != { 33, 55, 67, 88}
__set%d test-ip6 3
__set%d test-ip6 0
- element 21000000 : 0 [end] element 37000000 : 0 [end] element 43000000 : 0 [end] element 58000000 : 0 [end]
+ element 00000021 element 00000037 element 00000043 element 00000058
ip6 test-ip6 output
[ exthdr load ipv6 4b @ 44 + 4 => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
@@ -156,18 +156,17 @@ ip6 test-ip6 output
# frag reserved2 1
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 3 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000006 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000002 ]
+ [ bitwise reg 1 = ( reg 1 & 0x06 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x02 ]
# frag more-fragments 0
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 3 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000001 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
+ [ bitwise reg 1 = ( reg 1 & 0x01 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x00 ]
# frag more-fragments 1
ip6 test-ip6 output
[ exthdr load ipv6 1b @ 44 + 3 => reg 1 ]
- [ bitwise reg 1 = ( reg 1 & 0x00000001 ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000001 ]
-
+ [ bitwise reg 1 = ( reg 1 & 0x01 ) ^ 0x00 ]
+ [ cmp eq reg 1 0x01 ]