Skip to contentSkip to conversation

tests: py: fix payloads for sets with user data

PATCH In review Jeremy Sowden 1 participant 2 messages Sep 18, 2022 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: py: fix payloads for sets with user data

A change was recently made to libnftnl to stop set user data being truncated in dumps. This causes mismatches in the payloads of certain Python test-cases. This commit updates them to include the formerly truncated user data.

---
 tests/py/ip6/srh.t.payload | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
tests/py/ip6/srh.t.payload +6 -3
index b6247456eb72..678e570e6621 100644
@@ -11,7 +11,8 @@ ip6 test-ip6 input
 # srh last-entry { 0, 4-127, 255 }
 __set%d test-ip6 7 size 5
 __set%d test-ip6 0
-	element 00000000  : 0 [end]	element 00000001  : 1 [end]	element 00000004  : 0 [end]	element 00000080  : 1 [end]	element 000000ff  : 0 [end]  userdata = {
+	element 00000000  : 0 [end]	element 00000001  : 1 [end]	element 00000004  : 0 [end]	element 00000080  : 1 [end]	element 000000ff  : 0 [end]  userdata = { \x01\x04\x01\x00\x00\x00 }
+
 ip6 test-ip6 input
   [ exthdr load ipv6 1b @ 43 + 4 => reg 1 ]
   [ lookup reg 1 set __set%d ]
@@ -29,7 +30,8 @@ ip6 test-ip6 input
 # srh flags { 0, 4-127, 255 }
 __set%d test-ip6 7 size 5
 __set%d test-ip6 0
-	element 00000000  : 0 [end]	element 00000001  : 1 [end]	element 00000004  : 0 [end]	element 00000080  : 1 [end]	element 000000ff  : 0 [end]  userdata = {
+	element 00000000  : 0 [end]	element 00000001  : 1 [end]	element 00000004  : 0 [end]	element 00000080  : 1 [end]	element 000000ff  : 0 [end]  userdata = { \x01\x04\x01\x00\x00\x00 }
+
 ip6 test-ip6 input
   [ exthdr load ipv6 1b @ 43 + 5 => reg 1 ]
   [ lookup reg 1 set __set%d ]
@@ -47,7 +49,8 @@ ip6 test-ip6 input
 # srh tag { 0, 4-127, 0xffff }
 __set%d test-ip6 7 size 5
 __set%d test-ip6 0
-	element 00000000  : 0 [end]	element 00000100  : 1 [end]	element 00000400  : 0 [end]	element 00008000  : 1 [end]	element 0000ffff  : 0 [end]  userdata = {
+	element 00000000  : 0 [end]	element 00000100  : 1 [end]	element 00000400  : 0 [end]	element 00008000  : 1 [end]	element 0000ffff  : 0 [end]  userdata = { \x01\x04\x01\x00\x00\x00 }
+
 ip6 test-ip6 input
   [ exthdr load ipv6 2b @ 43 + 6 => reg 1 ]
   [ lookup reg 1 set __set%d ]
Signature · 1 line
2.35.1
#1 lore raw
Quoted 3 lines · Jeremy Sowden

A change was recently made to libnftnl to stop set user data being truncated in dumps. This causes mismatches in the payloads of certain Python test-cases. This commit updates them to include the formerly truncated user data.

Just noticed that Pablo has already fixed this. Never mind.

J.