Skip to content

Commit

Permalink
Update Copp Manager Redesign test plan (#1687)
Browse files Browse the repository at this point in the history
* update copp mnager redesign test plan
* update according to the comment
  • Loading branch information
JibinBao committed May 8, 2024
1 parent a23e80e commit 4c2969d
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions doc/copp/Copp_Manager_Redesign_test_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@ The test will be supported on ptf32, ptf64, t1 and t2.

## Test cases
### Test cases #1 - Verify 4 traps'default configuration
1. Verify the 4 traps(arp, lacp, udld, ip2me) are installed by sending traffic with the default config
1. Verify the 4 traps(arp, lacp, udld, ip2me) are installed by sending traffic with the default config
(For traffic validation, please see the Notes)

### Test cases #2 - Add a new trap
#### Pre-condition: The tested trap should be uninstalled on dut.
#### Since different vendor's ASIC might have some different invisible default traps will cause traffic to be trapped,
#### we also need to remove them.
#### For example: Remove ip2me because bgp traffic can fall back to ip2me trap then interfere following traffic tests
1. Set always_enabled of bgp to true with following cmds:

+ generate copp config file
Expand All @@ -98,37 +102,47 @@ The test will be supported on ptf32, ptf64, t1 and t2.
```
+ config load copp_bgp.json -y

2. Verify the corresponding trap status is installed by sending traffic
2. Verify the corresponding trap status is installed by sending traffic(For traffic validation, please see the Notes)
3. Recover the config


### Test cases #3 - Remove a trap by removing entry from feature table
#### Pre-condition: The tested trap has been installed on dut, with always_enable true and the corresponding entry enabled.
#### Since different vendor's ASIC might have some different invisible default traps will cause traffic to be trapped,
#### we also need to remove them.
#### For example: Remove ip2me because bgp traffic can fall back to ip2me trap then interfere following traffic tests
Take bgp trap as example:
1. Set always_enabled of bgp to false (refer to test #2)
2. Remove bgp entry from feature table with CMD
redis-cli -n 4 hdel "FEATURE|bgp" "auto_restart" "has_global_scope" "has_per_asic_scope" "has_timer" "high_mem_alert" "state"
3. Verify the tested trap is uninstalled by sending traffic
3. Verify the tested trap is uninstalled by sending traffic (For traffic validation, please see the Notes)
5. Recover the config


### Test cases #4 - Remove a trap by disabling feature table
#### Since different vendor's ASIC might have some different invisible default traps will cause traffic to be trapped,
#### we also need to remove them.
#### For example: Remove ip2me because bgp traffic can fall back to ip2me trap then interfere following traffic tests
Take bgp trap as an example:
1. Set always_enabled of bgp to false (refer to test #2)
2. Enable bgp in feature table: config feature state bgp enabled
3. Verify the tested trap is installed by sending traffic
3. Verify the tested trap is installed by sending traffic (For traffic validation, please see the Notes)
4. Disable bgp in feature table: config feature state bgp disabled
5. Verify the tested trap is uninstalled by sending traffic
5. Verify the tested trap is uninstalled by sending traffic (For traffic validation, please see the Notes)
6. Recover the config



### Test cases #5 - Verify trap configuration is saved or not after reboot(reboot, fast-reboot, warm-reboot)
1. Set always_enabled of a trap(e.g. bgp) to true
2. Config save -y
3. Do reboot randomly(reboot/warm-reboot/fast-reboot)
4. Verify configuration are saved successfully
5. Verify the trap status is installed by sending traffic
5. Verify the trap status is installed by sending traffic (For traffic validation, please see the Notes)
6. Recover the config


### Notes
When validating traffic, we need to take care the following cases:
1. When the trap is added, the traffic(rx_pps) will be in the range [PPS_LIMIT_MIN, self.PPS_LIMIT_MAX]
2. When the trap is removed, the traffic(rx_pps) will be smaller than PPS_LIMIT_MIN
Usually when the trap is removed, we expect the traffic for the trap should be 0, but it might be trapped by other traps.
For example: If only remove BGP traffic, BPG traffic will be trapped by IP2ME, so the traffic will not be 0

0 comments on commit 4c2969d

Please sign in to comment.