Browse Source

tc-testing: skbmod: fix match value of ethertype

iproute2 print_skbmod() prints the configured ethertype using format 0x%X:
therefore, test 9aa8 systematically fails, because it configures action #4
using ethertype 0x0031, and expects 0x0031 when it reads it back. Changing
the expected value to 0x31 lets the test result 'not ok' become 'ok'.

tested with:
 # ./tdc.py -e 9aa8
 Test 9aa8: Get a single skbmod action from a list
 All test results:

 1..1
 ok 1 9aa8 Get a single skbmod action from a list

Fixes: cf797ac49b94 ("tc-testing: Add test cases for police and skbmod")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Davide Caratti 7 years ago
parent
commit
79f3a8e662
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json

+ 1 - 1
tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json

@@ -315,7 +315,7 @@
         "cmdUnderTest": "$TC actions ls action skbmod",
         "cmdUnderTest": "$TC actions ls action skbmod",
         "expExitCode": "0",
         "expExitCode": "0",
         "verifyCmd": "$TC actions get action skbmod index 4",
         "verifyCmd": "$TC actions get action skbmod index 4",
-        "matchPattern": "action order [0-9]*: skbmod pipe set etype 0x0031",
+        "matchPattern": "action order [0-9]*: skbmod pipe set etype 0x31",
         "matchCount": "1",
         "matchCount": "1",
         "teardown": [
         "teardown": [
             "$TC actions flush action skbmod"
             "$TC actions flush action skbmod"