Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and couple of VS test infra fixes #49

Open
wants to merge 3 commits into
base: sonic-cfg-mgmt
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cfgmgr/buffermgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ task_process_status BufferMgr::doSpeedUpdateTask(string port, string speed)

if (m_cableLenLookup.count(port) == 0)
{
SWSS_LOG_INFO("Unable to create/update PG profile for port %s. Cable length is not set", port.c_str());
/* Set to NOTICE since cable length could be left empty */
SWSS_LOG_NOTICE("Unable to create/update PG profile for port %s. Cable length is not set", port.c_str());
return task_process_status::task_need_retry;
}

Expand Down
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ def __init__(self, name=None, imgname=None, keeptb=False, fakeplatform=None):
self.teamd = ['teamsyncd', 'teammgrd']
self.natd = ['natsyncd', 'natmgrd']
self.alld = self.basicd + self.swssd + self.syncd + self.rtd + self.teamd + self.natd
self.client = docker.from_env()
# Dynamic port breakout command may wait for 60 second incase of breakout failure.
# So, to avoid socket read timeout, setting timeout to 300 seconds
# Tries with 120 seconds, but still saw the failure, but 300 seconds consistently
# succeeded. Hence keeping it to 300 seconds while we dig deeper on why it
# take more than 60 seconds.
self.client = docker.from_env(timeout=300)
self.appldb = None

if subprocess.check_call(["/sbin/modprobe", "team"]) != 0:
Expand Down
17 changes: 7 additions & 10 deletions tests/test_port_dpb_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,13 @@ def test_cli_command_with_force_option(self, dvs):
dvs.change_port_breakout_mode("Ethernet8", breakoutMode1x)
dpb.verify_port_breakout_mode(dvs, "Ethernet8", breakoutMode1x)

def test_cli_command_with_load_default_port_config_option(self, dvs):
def test_cli_command_with_load_port_breakout_config_option(self, dvs):
dvs.setup_db()
dpb = DPB()
self.setup_db(dvs);
# Note below definitions are dependent on default_config_db.json
# Note below definitions are dependent on port_breakout_config_db.json
# That is vlanIDs, aclTableNames are all should match with
# VLANs and ACL tables in default_config_db.json
# VLANs and ACL tables in port_breakout_config_db.json
portGroup = ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3"]
rootPortName = portGroup[0]
vlanIDs = ["100", "101"]
Expand All @@ -399,7 +399,7 @@ def test_cli_command_with_load_default_port_config_option(self, dvs):

# Breakout port and expect that newly created ports are
# automatically added to VLANs and ACL tables as per
# default_config_db.json
# port_breakout_config_db.json
self.dvs_acl.verify_acl_group_num(0)
self.dvs_vlan.get_and_verify_vlan_member_ids(0)
dpb.verify_port_breakout_mode(dvs, rootPortName, breakoutMode1x)
Expand Down Expand Up @@ -432,7 +432,7 @@ def test_cli_command_with_load_default_port_config_option(self, dvs):

# Breakout port and expect that newly created ports are
# automatically added to VLANs and ACL tables as per
# default_config_db.json
# port_breakout_config_db.json
self.dvs_acl.verify_acl_group_num(0)
self.dvs_vlan.get_and_verify_vlan_member_ids(0)
dpb.verify_port_breakout_mode(dvs, rootPortName, breakoutMode1x)
Expand Down Expand Up @@ -494,7 +494,7 @@ def test_cli_command_with_load_default_port_config_option(self, dvs):
assert len(intf_entries) == 1

# Breakout Ethernet8 WITH "-l" option and ensure
# ip address gets configured as per default_config_db.json
# ip address gets configured as per port_breakout_config_db.json
dpb.verify_port_breakout_mode(dvs, "Ethernet8", breakoutMode1x)
dvs.change_port_breakout_mode("Ethernet8", breakoutMode2x, breakoutOption)
dpb.verify_port_breakout_mode(dvs, "Ethernet8", breakoutMode2x)
Expand Down Expand Up @@ -583,8 +583,6 @@ def test_cli_command_negative(self, dvs):
self.dvs_acl.verify_acl_group_num(0)
self.dvs_vlan.get_and_verify_vlan_member_ids(0)

# Enable below comment test scenario after fixing yang bug
"""
# Delete ACL table, Add back VLAN table and
# ensure breakout WITH "-l" fails
self.dvs_acl.remove_acl_table(aclTableNames[0])
Expand All @@ -607,10 +605,9 @@ def test_cli_command_negative(self, dvs):

# Delete ACL and VLAN tables
self.dvs_vlan.remove_vlan(vlanIDs[0])
"""
self.dvs_acl.remove_acl_table(aclTableNames[0])

# TBD: Provide "-l" option without default_config_db.json file
# TBD: Provide "-l" option without port_breakout_config_db.json file

# Verify cleanup
self.dvs_acl.verify_acl_table_count(0)
Expand Down