diff mbox series

[net-next,5/5] selftests/tc-testing: cls_u32: update tests

Message ID 20230818163544.351104-6-pctammela@mojatatu.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series selftests/tc-testing: add tests covering classid | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 1 maintainers not CCed: linux-kselftest@vger.kernel.org
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 40 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Pedro Tammela Aug. 18, 2023, 4:35 p.m. UTC
Update the u32 tests to conform to the new syntax of a terminal flowid

Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
---
 .../selftests/tc-testing/tc-tests/filters/u32.json     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Pedro Tammela Aug. 19, 2023, 8:48 p.m. UTC | #1
On 18/08/2023 13:35, Pedro Tammela wrote:
> Update the u32 tests to conform to the new syntax of a terminal flowid
> 
> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
> ---
>   .../selftests/tc-testing/tc-tests/filters/u32.json     | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
> index ddc7c355be0a..d4b4c767d6c9 100644
> --- a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
> +++ b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
> @@ -15,7 +15,7 @@
>           "cmdUnderTest": "$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.1/32 flowid 1:1 action ok",
>           "expExitCode": "0",
>           "verifyCmd": "$TC filter show dev $DEV1 ingress",
> -        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1.*match 7f000001/ffffffff at 12)",
> +        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 \\*flowid 1:1.*match 7f000001/ffffffff at 12)",
>           "matchCount": "3",
>           "teardown": [
>               "$TC qdisc del dev $DEV1 ingress"
> @@ -60,7 +60,7 @@
>           "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.2/32 indev notexist20 flowid 1:2 action ok",
>           "expExitCode": "2",
>           "verifyCmd": "$TC filter show dev $DEV1 ingress",
> -        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:3.*match 7f000003/ffffffff at 12)",
> +        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 \\*flowid 1:3.*match 7f000003/ffffffff at 12)",
>           "matchCount": "3",
>           "teardown": [
>               "$TC qdisc del dev $DEV1 ingress"
> @@ -196,7 +196,7 @@
>           "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 98 u32 ht 43:1 match tcp src 23 FFFF classid 1:4",
>           "expExitCode": "2",
>           "verifyCmd": "$TC filter show dev $DEV1 ingress",
> -        "matchPattern": "filter protocol ip pref 99 u32 chain (0[ ]+$|0 fh (43|800): ht divisor 1|0 fh 43::800 order 2048 key ht 43 bkt 0 flowid 1:3.*match 00160000/ffff0000 at nexthdr\\+0)",
> +        "matchPattern": "filter protocol ip pref 99 u32 chain (0[ ]+$|0 fh (43|800): ht divisor 1|0 fh 43::800 order 2048 key ht 43 bkt 0 \\*flowid 1:3.*match 00160000/ffff0000 at nexthdr\\+0)",
>           "matchCount": "4",
>           "teardown": [
>               "$TC qdisc del dev $DEV1 ingress"
> @@ -219,7 +219,7 @@
>           "cmdUnderTest": "bash -c \"for mask in ff ffff ffffff ffffffff ff00ff ff0000ff ffff00ff; do $TC filter add dev $DEV1 ingress prio 99 u32 ht 1: sample u32 0x10203040 \\$mask match u8 0 0 classid 1:1; done\"",
>           "expExitCode": "0",
>           "verifyCmd": "$TC filter show dev $DEV1 ingress",
> -        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 40 flowid 1:1",
> +        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 40 \\*flowid 1:1",
>           "matchCount": "7",
>           "teardown": [
>               "$TC qdisc del dev $DEV1 ingress"
> @@ -242,7 +242,7 @@
>           "cmdUnderTest": "bash -c \"for mask in 70 f0 ff0 fff0 ff00f0; do $TC filter add dev $DEV1 ingress prio 99 u32 ht 1: sample u32 0x10203040 \\$mask match u8 0 0 classid 1:1; done\"",
>           "expExitCode": "0",
>           "verifyCmd": "$TC filter show dev $DEV1 ingress",
> -        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 4 flowid 1:1",
> +        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 4 \\*flowid 1:1",
>           "matchCount": "5",
>           "teardown": [
>               "$TC qdisc del dev $DEV1 ingress"

Uh-oh, seems like this is broken again in iproute2-next.
Will double check...
diff mbox series

Patch

diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
index ddc7c355be0a..d4b4c767d6c9 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
@@ -15,7 +15,7 @@ 
         "cmdUnderTest": "$TC filter add dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.1/32 flowid 1:1 action ok",
         "expExitCode": "0",
         "verifyCmd": "$TC filter show dev $DEV1 ingress",
-        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1.*match 7f000001/ffffffff at 12)",
+        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 \\*flowid 1:1.*match 7f000001/ffffffff at 12)",
         "matchCount": "3",
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
@@ -60,7 +60,7 @@ 
         "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 1 u32 match ip src 127.0.0.2/32 indev notexist20 flowid 1:2 action ok",
         "expExitCode": "2",
         "verifyCmd": "$TC filter show dev $DEV1 ingress",
-        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:3.*match 7f000003/ffffffff at 12)",
+        "matchPattern": "filter protocol ip pref 1 u32 chain (0[ ]+$|0 fh 800: ht divisor 1|0 fh 800::800 order 2048 key ht 800 bkt 0 \\*flowid 1:3.*match 7f000003/ffffffff at 12)",
         "matchCount": "3",
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
@@ -196,7 +196,7 @@ 
         "cmdUnderTest": "$TC filter replace dev $DEV1 ingress protocol ip prio 98 u32 ht 43:1 match tcp src 23 FFFF classid 1:4",
         "expExitCode": "2",
         "verifyCmd": "$TC filter show dev $DEV1 ingress",
-        "matchPattern": "filter protocol ip pref 99 u32 chain (0[ ]+$|0 fh (43|800): ht divisor 1|0 fh 43::800 order 2048 key ht 43 bkt 0 flowid 1:3.*match 00160000/ffff0000 at nexthdr\\+0)",
+        "matchPattern": "filter protocol ip pref 99 u32 chain (0[ ]+$|0 fh (43|800): ht divisor 1|0 fh 43::800 order 2048 key ht 43 bkt 0 \\*flowid 1:3.*match 00160000/ffff0000 at nexthdr\\+0)",
         "matchCount": "4",
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
@@ -219,7 +219,7 @@ 
         "cmdUnderTest": "bash -c \"for mask in ff ffff ffffff ffffffff ff00ff ff0000ff ffff00ff; do $TC filter add dev $DEV1 ingress prio 99 u32 ht 1: sample u32 0x10203040 \\$mask match u8 0 0 classid 1:1; done\"",
         "expExitCode": "0",
         "verifyCmd": "$TC filter show dev $DEV1 ingress",
-        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 40 flowid 1:1",
+        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 40 \\*flowid 1:1",
         "matchCount": "7",
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
@@ -242,7 +242,7 @@ 
         "cmdUnderTest": "bash -c \"for mask in 70 f0 ff0 fff0 ff00f0; do $TC filter add dev $DEV1 ingress prio 99 u32 ht 1: sample u32 0x10203040 \\$mask match u8 0 0 classid 1:1; done\"",
         "expExitCode": "0",
         "verifyCmd": "$TC filter show dev $DEV1 ingress",
-        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 4 flowid 1:1",
+        "matchPattern": "filter protocol all pref 99 u32( (chain|fh|order) [0-9:]+){3} key ht 1 bkt 4 \\*flowid 1:1",
         "matchCount": "5",
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"