Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8571deb0 authored by Roman Mashak's avatar Roman Mashak Committed by David S. Miller
Browse files

tc-testing: updated vlan action tests with batch create/delete



Update TDC tests with cases varifying ability of TC to install or delete
batches of vlan actions.

Signed-off-by: default avatarRoman Mashak <mrv@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b35475c5
Loading
Loading
Loading
Loading
+94 −0
Original line number Diff line number Diff line
@@ -713,5 +713,99 @@
        "teardown": [
            "$TC actions flush action vlan"
        ]
    },
    {
        "id": "294e",
        "name": "Add batch of 32 vlan push actions with cookie",
        "category": [
            "actions",
            "vlan"
        ],
        "setup": [
            [
                "$TC actions flush action vlan",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action vlan",
        "matchPattern": "^[ \t]+index [0-9]+ ref",
        "matchCount": "32",
        "teardown": [
            "$TC actions flush action vlan"
        ]
    },
    {
        "id": "56f7",
        "name": "Delete batch of 32 vlan push actions",
        "category": [
            "actions",
            "vlan"
        ],
        "setup": [
            [
                "$TC actions flush action vlan",
                0,
                1,
                255
            ],
            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan push protocol 802.1q id 4094 priority 7 pipe index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
        ],
        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action vlan",
        "matchPattern": "^[ \t]+index [0-9]+ ref",
        "matchCount": "0",
        "teardown": []
    },
    {
        "id": "759f",
        "name": "Add batch of 32 vlan pop actions with cookie",
        "category": [
            "actions",
            "vlan"
        ],
        "setup": [
            [
                "$TC actions flush action vlan",
                0,
                1,
                255
            ]
        ],
        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop continue index \\$i cookie aabbccddeeff112233445566778800a1 \\\"; args=\"\\$args\\$cmd\"; done && $TC actions add \\$args\"",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action vlan",
        "matchPattern": "^[ \t]+index [0-9]+ ref",
        "matchCount": "32",
        "teardown": [
            "$TC actions flush action vlan"
        ]
    },
    {
        "id": "c84a",
        "name": "Delete batch of 32 vlan pop actions",
        "category": [
            "actions",
            "vlan"
        ],
        "setup": [
            [
                "$TC actions flush action vlan",
                0,
                1,
                255
            ],
            "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan pop index \\$i \\\"; args=\\\"\\$args\\$cmd\\\"; done && $TC actions add \\$args\""
        ],
        "cmdUnderTest": "bash -c \"for i in \\`seq 1 32\\`; do cmd=\\\"action vlan index \\$i \\\"; args=\"\\$args\\$cmd\"; done && $TC actions del \\$args\"",
        "expExitCode": "0",
        "verifyCmd": "$TC actions list action vlan",
        "matchPattern": "^[ \t]+index [0-9]+ ref",
        "matchCount": "0",
        "teardown": []
    }
]