From 3d022f85fbfa59e9c8737c95241f0bb1e2afbbd3 Mon Sep 17 00:00:00 2001 From: Vasant Patil Date: Mon, 27 Jul 2020 11:57:20 -0700 Subject: [PATCH] Cleanup and couple of VS test infra fixes RB= G=lnos-reviewers R=pchaudhary,pmao,samaity,zxu A= --- cfgmgr/buffermgr.cpp | 3 ++- tests/conftest.py | 7 ++++++- tests/test_port_dpb_system.py | 17 +++++++---------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cfgmgr/buffermgr.cpp b/cfgmgr/buffermgr.cpp index ad738f2b501..a37d34635c7 100644 --- a/cfgmgr/buffermgr.cpp +++ b/cfgmgr/buffermgr.cpp @@ -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; } diff --git a/tests/conftest.py b/tests/conftest.py index 8a290c3dbb4..607acbcb076 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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: diff --git a/tests/test_port_dpb_system.py b/tests/test_port_dpb_system.py index 33cf7663458..c0ff22893fb 100644 --- a/tests/test_port_dpb_system.py +++ b/tests/test_port_dpb_system.py @@ -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"] @@ -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) @@ -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) @@ -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) @@ -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]) @@ -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)