[pytest] Add new test to check BGP update time#2594
Merged
lolyu merged 5 commits intosonic-net:masterfrom Nov 30, 2020
Merged
Conversation
Add variable `db_table_name` to `bgpmon.j2` so that it could be used in add peers to tables like `BGP_NEIGHBOR`. Rename it to `bgp_template.j2` to reflect this change. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Use neighbor ip to name BGP dump file instead of using DUT's IP in case of there might be multiple BGP sessions connected to the same DUT IP address. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
d80f888 to
b976899
Compare
Add new testcase `test_bgp_update_timer` to ensure BGP updates are propagated within certain time threshold. For FRRouting, time interval for the update in and update out for the same route must be within 1s. For Quagga, the time interval must be within 20s. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
b976899 to
0d5161b
Compare
Collaborator
Author
|
Retest this please |
wangxin
reviewed
Nov 27, 2020
Collaborator
Author
|
updated and retest passed, @wangxin, please help to review again, thanks. |
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
e92b782 to
ef1f236
Compare
wangxin
reviewed
Nov 27, 2020
| line = stdin.readline() | ||
| obj = json.loads(line) | ||
| f = open("/tmp/exabgp-" + obj["neighbor"]["ip"], "a") | ||
| f = open("/tmp/exabgp-" + obj["neighbor"]["address"]["local"], "a") |
Collaborator
Author
There was a problem hiding this comment.
Because DUT uses loopback address as router ID for both sessions, those two exabgp will dump to the same file.
Change BGP update match conditions: 1. Check withdrawn routes length first to decide if withdrawn routes exists. 2. Check total path attributes length first to decide if nlri is included in this update message. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
wangxin
approved these changes
Nov 30, 2020
bingwang-ms
approved these changes
Nov 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
Add a testcase
test_bgp_update_timerto cover the following testing scenario:Type of change
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
t0t1Any platform specific information?
Supported testbed topology if it's a new test case?
t0andt1Documentation