diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-10-16 14:31:46 +0200 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2026-01-27 23:01:54 +0100 |
| commit | 0f566ac1c1dbd9f2e7d006ca01211aae791f09a8 (patch) | |
| tree | a672d67eefb7ca5b51550721c9d440bd1845a887 /tests/py/inet/ipsec.t.payload | |
| parent | db82466117b8bfc93923eec49114d47200f7f913 (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/inet/ipsec.t.payload')
| -rw-r--r-- | tests/py/inet/ipsec.t.payload | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/py/inet/ipsec.t.payload b/tests/py/inet/ipsec.t.payload index f8ecd9d1..2e012db1 100644 --- a/tests/py/inet/ipsec.t.payload +++ b/tests/py/inet/ipsec.t.payload @@ -16,12 +16,12 @@ ip ipsec-ip4 ipsec-input # ipsec out spi 1-561 inet ipsec-inet ipsec-post [ xfrm load out 0 spi => reg 1 ] - [ range eq reg 1 0x01000000 0x31020000 ] + [ range eq reg 1 0x00000001 0x00000231 ] # ipsec in spnum 2 ip saddr { 1.2.3.4, 10.6.0.0/16 } __set%d ipsec-ip4 7 size 5 __set%d ipsec-ip4 0 - element 00000000 : 1 [end] element 04030201 : 0 [end] element 05030201 : 1 [end] element 0000060a : 0 [end] element 0000070a : 1 [end] + element 00000000 flags 1 element 01020304 element 01020305 flags 1 element 0a060000 element 0a070000 flags 1 ip ipsec-ip4 ipsec-input [ xfrm load in 2 saddr4 => reg 1 ] [ lookup reg 1 set __set%d ] @@ -29,16 +29,15 @@ ip ipsec-ip4 ipsec-input # ipsec in ip6 daddr dead::beef ip ipsec-ip4 ipsec-forw [ xfrm load in 0 daddr6 => reg 1 ] - [ cmp eq reg 1 0x0000adde 0x00000000 0x00000000 0xefbe0000 ] + [ cmp eq reg 1 0xdead0000 0x00000000 0x00000000 0x0000beef ] # ipsec out ip6 saddr dead::feed ip ipsec-ip4 ipsec-forw [ xfrm load out 0 saddr6 => reg 1 ] - [ cmp eq reg 1 0x0000adde 0x00000000 0x00000000 0xedfe0000 ] + [ cmp eq reg 1 0xdead0000 0x00000000 0x00000000 0x0000feed ] # counter ipsec out ip daddr 192.168.1.2 ip ipsec-ip4 ipsec-forw [ counter pkts 0 bytes 0 ] [ xfrm load out 0 daddr4 => reg 1 ] - [ cmp eq reg 1 0x0201a8c0 ] - + [ cmp eq reg 1 0xc0a80102 ] |
