forked from sonic-net/sonic-swss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into master-dash-merge
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import time | ||
import os | ||
import pytest | ||
|
||
from swsscommon import swsscommon | ||
|
||
DVS_ENV = ["HWSKU=Mellanox-SN2700"] | ||
|
||
class TestPort(object): | ||
def test_PortFecOverride(self, dvs, testlog): | ||
db = swsscommon.DBConnector(0, dvs.redis_sock, 0) | ||
adb = dvs.get_asic_db() | ||
|
||
ptbl = swsscommon.ProducerStateTable(db, "PORT_TABLE") | ||
|
||
# set fec | ||
fvs = swsscommon.FieldValuePairs([("fec","rs")]) | ||
ptbl.set("Ethernet4", fvs) | ||
|
||
# validate if fec rs is pushed to asic db when set first time | ||
port_oid = adb.port_name_map["Ethernet4"] | ||
expected_fields = {"SAI_PORT_ATTR_FEC_MODE":"SAI_PORT_FEC_MODE_RS", "SAI_PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE":"true"} | ||
adb.wait_for_field_match("ASIC_STATE:SAI_OBJECT_TYPE_PORT", port_oid, expected_fields) | ||
|
||
|
||
# Add Dummy always-pass test at end as workaroud | ||
# for issue when Flaky fail on final test it invokes module tear-down before retrying | ||
def test_nonflaky_dummy(): | ||
pass | ||
|