Re: [PATCH net-next 1/1] tc-testing: add csum tests

2018-03-09 Thread David Miller
From: Roman Mashak 
Date: Thu,  8 Mar 2018 14:56:43 -0500

> Signed-off-by: Roman Mashak 

Applied, thanks.


Re: [PATCH net-next 1/1] tc-testing: add csum tests

2018-03-09 Thread Davide Caratti
On Thu, 2018-03-08 at 14:56 -0500, Roman Mashak wrote:
> Signed-off-by: Roman Mashak 
> ---
>  .../tc-testing/tc-tests/actions/csum.json  | 410 
> +
>  1 file changed, 410 insertions(+)
>  create mode 100644 
> tools/testing/selftests/tc-testing/tc-tests/actions/csum.json
> 

# ./tdc.py -c csum

...

All test results: 

1..17 
ok 1 - 6d84 # Add csum iph action   
ok 2 - 1862 # Add csum ip4h action  
ok 3 - 15c6 # Add csum ipv4h action 
ok 4 - bf47 # Add csum icmp action  
ok 5 - cc1d # Add csum igmp action  
ok 6 - bccc # Add csum foobar action
ok 7 - 3bb4 # Add csum tcp action   
ok 8 - 759c # Add csum udp action   
ok 9 - bdb6 # Add csum udp xor iph action   
ok 10 - c220 # Add csum udplite action  
ok 11 - 8993 # Add csum sctp action 
ok 12 - b138 # Add csum ip & icmp action
ok 13 - eeda # Add csum ip & sctp action
ok 14 - 0017 # Add csum udp or tcp action   
ok 15 - ce92 # Add csum udp action with cookie  
ok 16 - 912f # Add csum icmp action with large
cookie
ok 17 - 879b # Add batch of 32 csum tcp actions 

Tested-by: Davide Caratti 



[PATCH net-next 1/1] tc-testing: add csum tests

2018-03-08 Thread Roman Mashak
Signed-off-by: Roman Mashak 
---
 .../tc-testing/tc-tests/actions/csum.json  | 410 +
 1 file changed, 410 insertions(+)
 create mode 100644 
tools/testing/selftests/tc-testing/tc-tests/actions/csum.json

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/csum.json 
b/tools/testing/selftests/tc-testing/tc-tests/actions/csum.json
new file mode 100644
index ..93cf8fea8ae7
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/csum.json
@@ -0,0 +1,410 @@
+[
+{
+"id": "6d84",
+"name": "Add csum iph action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum iph index 800",
+"expExitCode": "0",
+"verifyCmd": "$TC actions get action csum index 800",
+"matchPattern": "action order [0-9]*: csum \\(iph\\) action 
pass.*index 800 ref",
+"matchCount": "1",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "1862",
+"name": "Add csum ip4h action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum ip4h index 7",
+"expExitCode": "0",
+"verifyCmd": "$TC actions get action csum index 7",
+"matchPattern": "action order [0-9]*: csum \\(iph\\) action 
pass.*index 7 ref",
+"matchCount": "1",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "15c6",
+"name": "Add csum ipv4h action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum ipv4h index 1122",
+"expExitCode": "0",
+"verifyCmd": "$TC actions get action csum index 1122",
+"matchPattern": "action order [0-9]*: csum \\(iph\\) action 
pass.*index 1122 ref",
+"matchCount": "1",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "bf47",
+"name": "Add csum icmp action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum icmp index 1",
+"expExitCode": "0",
+"verifyCmd": "$TC actions get action csum index 1",
+"matchPattern": "action order [0-9]*: csum \\(icmp\\) action 
pass.*index 1 ref",
+"matchCount": "1",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "cc1d",
+"name": "Add csum igmp action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum igmp index 999",
+"expExitCode": "0",
+"verifyCmd": "$TC actions get action csum index 999",
+"matchPattern": "action order [0-9]*: csum \\(igmp\\) action 
pass.*index 999 ref",
+"matchCount": "1",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "bccc",
+"name": "Add csum foobar action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+]
+],
+"cmdUnderTest": "$TC actions add action csum foobar index 1",
+"expExitCode": "255",
+"verifyCmd": "$TC actions ls action csum",
+"matchPattern": "action order [0-9]*: csum \\(foobar\\) action 
pass.*index 1 ref",
+"matchCount": "0",
+"teardown": [
+"$TC actions flush action csum"
+]
+},
+{
+"id": "3bb4",
+"name": "Add csum tcp action",
+"category": [
+"actions",
+"csum"
+],
+"setup": [
+[
+"$TC actions flush action csum",
+0,
+1,
+255
+