All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] tc-testing: skbmod: fix match value of ethertype
@ 2018-03-02 13:44 Davide Caratti
  2018-03-04 23:39 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Davide Caratti @ 2018-03-02 13:44 UTC (permalink / raw)
  To: David S. Miller, Lucas Bates, netdev; +Cc: Jamal Hadi Salim

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>
---
 tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json b/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json
index e34075059c26..90bba48c3f07 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json
@@ -315,7 +315,7 @@
         "cmdUnderTest": "$TC actions ls action skbmod",
         "expExitCode": "0",
         "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",
         "teardown": [
             "$TC actions flush action skbmod"
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] tc-testing: skbmod: fix match value of ethertype
  2018-03-02 13:44 [PATCH net] tc-testing: skbmod: fix match value of ethertype Davide Caratti
@ 2018-03-04 23:39 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-04 23:39 UTC (permalink / raw)
  To: dcaratti; +Cc: lucasb, netdev, jhs

From: Davide Caratti <dcaratti@redhat.com>
Date: Fri,  2 Mar 2018 14:44:39 +0100

> 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>

Applied, thanks Davide.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-04 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 13:44 [PATCH net] tc-testing: skbmod: fix match value of ethertype Davide Caratti
2018-03-04 23:39 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.