[
    {
        "id": "8b6e",
        "name": "Create RED with no flags",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "342e",
        "name": "Create RED with adaptive flag",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red adaptive limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb adaptive $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "2d4b",
        "name": "Create RED with ECN flag",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "650f",
        "name": "Create RED with flags ECN, adaptive",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn adaptive limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn adaptive $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "5f15",
        "name": "Create RED with flags ECN, harddrop",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn harddrop limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn harddrop $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "53e8",
        "name": "Create RED with flags ECN, nodrop",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn nodrop limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn nodrop $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "d091",
        "name": "Fail to create RED with only nodrop flag",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red nodrop limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "2",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red",
        "matchCount": "0",
        "teardown": [
        ]
    },
    {
        "id": "af8e",
        "name": "Create RED with flags ECN, nodrop, harddrop",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn harddrop nodrop limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn harddrop nodrop $",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    },
    {
        "id": "290a",
        "name": "Show RED class",
        "category": [
            "qdisc",
            "red"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red limit 1M avpkt 1500 min 100K max 300K",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class red 1:[0-9]+ parent 1:",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root"
        ]
    }
]
