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

Reverted skipped test_buffer_dynamic test cases #1937

Merged
merged 1 commit into from
Sep 30, 2021
Merged
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
37 changes: 1 addition & 36 deletions orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,42 +330,7 @@ bool Orch::parseReference(type_map &type_maps, string &ref_in, const string &typ
if ((ref_in[0] == ref_start) || (ref_in[ref_in.size()-1] == ref_end))
{
SWSS_LOG_ERROR("malformed reference:%s. Must not be surrounded by [ ]\n", ref_in.c_str());
/*
* Accepting old format until sonic-buildimage changes merged, swss tests depends on
* generate qos configs which are with old format. If we skip the old format
* isPortAllReady() will fail whcih is set ready by checking buffer config exists in CONFIG_DB are
* applied to ASIC_DB or not.
* Due to this All swss test cases are failing.
* This to avoid test case failures until merge happens.
*
*/
if (ref_in.size() == 2)
{
// value set by user is "[]"
// Deem it as a valid format
// clear both type_name and object_name
// as an indication to the caller that
// such a case has been encountered
// type_name.clear();
object_name.clear();
return true;
}
string ref_content = ref_in.substr(1, ref_in.size() - 2);
vector<string> tokens;
tokens = tokenize(ref_content, delimiter);
if (tokens.size() != 2)
{
tokens = tokenize(ref_content, config_db_key_delimiter);
if (tokens.size() != 2)
{
SWSS_LOG_ERROR("malformed reference:%s. Must contain 2 tokens\n", ref_content.c_str());
return false;
}
}
object_name = tokens[1];
SWSS_LOG_ERROR("parsed: type_name:%s, object_name:%s", type_name.c_str(), object_name.c_str());

return true;
return false;
}
auto type_it = type_maps.find(type_name);
if (type_it == type_maps.end())
Expand Down
17 changes: 4 additions & 13 deletions tests/test_buffer_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def change_cable_length(self, cable_length):
cable_lengths['Ethernet0'] = cable_length
self.config_db.update_entry('CABLE_LENGTH', 'AZURE', cable_lengths)

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_changeSpeed(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -193,7 +192,6 @@ def test_changeSpeed(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_changeCableLen(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -244,7 +242,6 @@ def test_changeCableLen(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_MultipleLosslessPg(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -292,7 +289,6 @@ def test_MultipleLosslessPg(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_headroomOverride(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -376,7 +372,6 @@ def test_headroomOverride(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_mtuUpdate(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -411,7 +406,6 @@ def test_mtuUpdate(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_nonDefaultAlpha(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -454,7 +448,6 @@ def test_nonDefaultAlpha(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_sharedHeadroomPool(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -553,7 +546,6 @@ def test_sharedHeadroomPool(self, dvs, testlog):
# Shutdown interface
dvs.runcmd('config interface shutdown Ethernet0')

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_shutdownPort(self, dvs, testlog):
self.setup_db(dvs)

Expand Down Expand Up @@ -597,7 +589,6 @@ def test_shutdownPort(self, dvs, testlog):
# Shutdown interface
dvs.runcmd("config interface shutdown Ethernet0")

@pytest.mark.skip("Skip to be removed after sonic-buildimage changes get merged")
def test_autoNegPort(self, dvs, testlog):
self.setup_db(dvs)

Expand All @@ -623,11 +614,11 @@ def test_autoNegPort(self, dvs, testlog):
self.app_db.wait_for_entry("BUFFER_PG_TABLE", "Ethernet0:3-4")
self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile)
self.check_new_profile_in_asic_db(dvs, expectedProfile)
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfile)})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile})

# Configure another lossless PG on the interface
self.config_db.update_entry('BUFFER_PG', 'Ethernet0|6', {'profile': 'NULL'})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfile)})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile})

# Disable port auto negotiation
dvs.runcmd('config interface autoneg Ethernet0 disabled')
Expand All @@ -636,8 +627,8 @@ def test_autoNegPort(self, dvs, testlog):
expectedProfile = self.make_lossless_profile_name(self.originalSpeed, self.originalCableLen)
self.app_db.wait_for_entry("BUFFER_PROFILE_TABLE", expectedProfile)
self.check_new_profile_in_asic_db(dvs, expectedProfile)
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfile)})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": "[BUFFER_PROFILE_TABLE:{}]".format(expectedProfile)})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:3-4", {"profile": expectedProfile})
self.app_db.wait_for_field_match("BUFFER_PG_TABLE", "Ethernet0:6", {"profile": expectedProfile})

# Remove lossless PGs on the interface
self.config_db.delete_entry('BUFFER_PG', 'Ethernet0|3-4')
Expand Down