Add support for fabric monitor daemon (swss part). #2920
Merged
Azure Pipelines / Azure.sonic-swss
succeeded
Dec 2, 2023 in 5h 49m 50s
Build #20231201.10 had test failures
Details
- Failed: 2 (0.20%)
- Passed: 946 (93.85%)
- Other: 60 (5.95%)
- Total: 1,008
- 21167 of 53663 lines covered (39.44%)
Annotations
Check failure on line 758 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L758
Bash exited with code '123'.
Check failure on line 1 in test_add_remove_port
azure-pipelines / Azure.sonic-swss
test_add_remove_port
assert 1 == 0 -1 +0
Raw output
self = <test_drop_counters.TestDropCounters object at 0x7fe5ffd15730>
dvs = <conftest.DockerVirtualSwitch object at 0x7fe6002ae7f0>, testlog = None
def test_add_remove_port(self, dvs, testlog):
"""
This test verifies that debug counters are removed when we remove a port
and debug counters are added each time we add ports (if debug counter is enabled)
"""
self.setup_db(dvs)
# save port info
cdb = swsscommon.DBConnector(4, dvs.redis_sock, 0)
tbl = swsscommon.Table(cdb, PORT_TABLE_NAME)
(status, fvs) = tbl.get(PORT)
assert status == True
# get counter oid
oid = self.getPortOid(dvs, PORT)
# verifies debug coutner dont exist for port
flex_counter_table = swsscommon.Table(self.flex_db, FLEX_COUNTER_TABLE)
status, fields = flex_counter_table.get(oid)
> assert len(fields) == 0
E assert 1 == 0
E -1
E +0
test_drop_counters.py:688: AssertionError
Check failure on line 1 in test_createAndDeleteMultipleCounters
azure-pipelines / Azure.sonic-swss
test_createAndDeleteMultipleCounters
AssertionError: assert 'SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS' in 'SAI_PORT_STAT_OUT_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS,SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS'
Raw output
self = <test_drop_counters.TestDropCounters object at 0x7fe6002bf7c0>
dvs = <conftest.DockerVirtualSwitch object at 0x7fe6002ae7f0>, testlog = None
def test_createAndDeleteMultipleCounters(self, dvs, testlog):
"""
This test verifies that creating and deleting multiple drop counters
at the same time works correctly.
"""
self.setup_db(dvs)
asic_state_table = swsscommon.Table(self.asic_db, ASIC_STATE_TABLE)
flex_counter_table = swsscommon.Table(self.flex_db, FLEX_COUNTER_TABLE)
name1 = 'DEBUG_0'
reason1 = 'L3_ANY'
name2 = 'DEBUG_1'
reason2 = 'ACL_ANY'
self.create_drop_counter(name1, PORT_INGRESS_DROPS)
self.add_drop_reason(name1, reason1)
self.create_drop_counter(name2, PORT_INGRESS_DROPS)
self.add_drop_reason(name2, reason2)
time.sleep(5)
# Verify that the flex counters are correctly tracking two different
# drop counters.
> self.checkFlexState([PORT_STAT_BASE, PORT_STAT_INDEX_1], PORT_DEBUG_COUNTER_LIST)
test_drop_counters.py:762:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_drop_counters.TestDropCounters object at 0x7fe6002bf7c0>
stats = ['SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS', 'SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS']
counter_list_type = 'PORT_DEBUG_COUNTER_ID_LIST'
def checkFlexState(self, stats, counter_list_type):
flex_counter_table = swsscommon.Table(self.flex_db, FLEX_COUNTER_TABLE)
for oid in flex_counter_table.getKeys():
attributes = self.genericGetAndAssert(flex_counter_table, oid)
assert len(attributes) == 1
field, tracked_stats = attributes[0]
assert field == counter_list_type
for stat in stats:
> assert stat in tracked_stats
E AssertionError: assert 'SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS' in 'SAI_PORT_STAT_OUT_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS,SAI_PORT_STAT_IN_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS'
test_drop_counters.py:109: AssertionError
Loading