Skip to contentSkip to conversation

tests: py: update rawpayload.t.json

PATCH New Pablo Neira Ayuso 1 participant 1 message Nov 5, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 tests: py: update rawpayload.t.json

Missing update of json test.

Fixes 6ad2058da66a ("datatype: add xinteger_type alias to print in hexadecimal")
---
 tests/py/any/rawpayload.t.json        |  8 ++++----
 tests/py/any/rawpayload.t.json.output | 18 +++++++++++++++++-
 2 files changed, 21 insertions(+), 5 deletions(-)
tests/py/any/rawpayload.t.json +4 -4
index 22028ad82300..9481d9bf543b 100644
@@ -66,7 +66,7 @@
     }
 ]
 
-# @nh,8,8 255
+# @nh,8,8 0xff
 [
     {
         "match": {
@@ -78,12 +78,12 @@
                 }
             },
 	    "op": "==",
-            "right": 255
+            "right": "0xff"
         }
     }
 ]
 
-# @nh,8,16 0
+# @nh,8,16 0x0
 [
     {
         "match": {
@@ -117,7 +117,7 @@
     }
 ]
 
-# @ll,0,8 and 0x80 eq 0x80
+# @ll,0,8 & 0x80 == 0x80
 [
     {
         "match": {
tests/py/any/rawpayload.t.json.output +17 -1
index ccadbc57ce09..291b237aed0f 100644
@@ -79,7 +79,7 @@
     }
 ]
 
-# @ll,0,8 and 0x80 eq 0x80
+# @ll,0,8 & 0x80 == 0x80
 [
     {
         "match": {
@@ -101,3 +101,19 @@
     }
 ]
 
+# @nh,8,8 0xff
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "base": "nh",
+                    "len": 8,
+                    "offset": 8
+                }
+            },
+            "op": "==",
+            "right": 255
+        }
+    }
+]
Signature · 1 line
2.30.2