sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
736 stars 1.42k forks source link

test_unknow_mac failure #8429

Open lguohan opened 3 years ago

lguohan commented 3 years ago

Description

Steps to reproduce the issue:

run test_unknown_mac on dual-tor arista testbed

Describe the results you received:

2021-08-10T14:03:09.6669121Z ============================= test session starts ==============================
2021-08-10T14:03:09.6672679Z platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
2021-08-10T14:03:09.6719168Z ansible: 2.8.12
2021-08-10T14:03:09.6721860Z rootdir: /azp/agent/_work/8/s/tests, inifile: pytest.ini
2021-08-10T14:03:09.6725506Z plugins: metadata-1.11.0, forked-1.3.0, xdist-1.28.0, repeat-0.9.1, html-1.22.1, ansible-2.2.2
2021-08-10T14:03:09.7002631Z collected 3 items
2021-08-10T14:03:09.7003628Z 
2021-08-10T14:05:26.0525523Z pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-3] FAILED [ 33%]
2021-08-10T14:06:13.6697256Z pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-4] FAILED [ 66%]
2021-08-10T14:07:02.8045443Z pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-8] FAILED [100%]
2021-08-10T14:07:02.8046739Z 
2021-08-10T14:07:02.8049496Z =================================== FAILURES ===================================
2021-08-10T14:07:02.8052489Z ___________________ TestUnknownMac.test_unknown_mac[dscp-3] ____________________
2021-08-10T14:07:02.8053534Z 
2021-08-10T14:07:02.8056066Z self = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84b7e94dd0>
2021-08-10T14:07:02.8059912Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8063120Z dscp = 'dscp-3'
2021-08-10T14:07:02.8065456Z duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8068148Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8070727Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8071843Z 
2021-08-10T14:07:02.8074275Z     @pytest.mark.parametrize("dscp", ["dscp-3", "dscp-4", "dscp-8"])
2021-08-10T14:07:02.8077295Z     def test_unknown_mac(self, unknownMacSetup, dscp, duthosts, rand_one_dut_hostname, ptfadapter):
2021-08-10T14:07:02.8079828Z         """
2021-08-10T14:07:02.8082063Z         Verify unknown mac behavior for lossless and lossy priority
2021-08-10T14:07:02.8084429Z     
2021-08-10T14:07:02.8086809Z         This test ensures that packets send on lossless and lossy priority get dropped
2021-08-10T14:07:02.8089592Z         when the arp to mac mapping is present in the arp table and mac to port mapping
2021-08-10T14:07:02.8091996Z         is absent in the mac table
2021-08-10T14:07:02.8094118Z     
2021-08-10T14:07:02.8096352Z         Args:
2021-08-10T14:07:02.8098729Z             unknownMacSetup(fixture) : module scope autouse fixture for test setup
2021-08-10T14:07:02.8101430Z             dscp(string) : parametrized values for dscp
2021-08-10T14:07:02.8111201Z             duthosts(AnsibleHost) : multi dut instance
2021-08-10T14:07:02.8113853Z             rand_one_dut_hostname(AnsibleHost) : one of the dut instances from the multi dut
2021-08-10T14:07:02.8116428Z             ptfadapter(dataplane) : ptf runner instance
2021-08-10T14:07:02.8118939Z         """
2021-08-10T14:07:02.8120999Z         setup = unknownMacSetup
2021-08-10T14:07:02.8123566Z         self.dscp = int(dscp.split("-")[-1])
2021-08-10T14:07:02.8125822Z         self.duthost = duthosts[rand_one_dut_hostname]
2021-08-10T14:07:02.8128329Z         self.ptfadapter = ptfadapter
2021-08-10T14:07:02.8130813Z         self.dst_port = setup['dst_port']
2021-08-10T14:07:02.8133119Z         self.ptf_dst_port = setup['ptf_dst_port']
2021-08-10T14:07:02.8135627Z         self.dst_ip = setup['vlan']['hostip']
2021-08-10T14:07:02.8137952Z         self.vlan_ports = setup['vlan']['ports']
2021-08-10T14:07:02.8140382Z         self.ptf_vlan_ports = setup['ptf_vlan_ports']
2021-08-10T14:07:02.8142795Z         self.pc_intfs = setup['pc_intfs']
2021-08-10T14:07:02.8145088Z         self.ptf_pc_ports = setup['ptf_pc_ports']
2021-08-10T14:07:02.8147331Z         self.validateEntries()
2021-08-10T14:07:02.8149364Z >       self.run()
2021-08-10T14:07:02.8150066Z 
2021-08-10T14:07:02.8152192Z dscp       = 'dscp-3'
2021-08-10T14:07:02.8154408Z duthosts   = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8157331Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8159975Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8162447Z self       = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84b7e94dd0>
2021-08-10T14:07:02.8166051Z setup      = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8170486Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8172008Z 
2021-08-10T14:07:02.8173945Z pfc/test_unknown_mac.py:342: 
2021-08-10T14:07:02.8176127Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8178359Z pfc/test_unknown_mac.py:359: in run
2021-08-10T14:07:02.8180348Z     thandle.runTest()
2021-08-10T14:07:02.8182321Z pfc/test_unknown_mac.py:310: in runTest
2021-08-10T14:07:02.8184347Z     self._verifyIntfCounters()
2021-08-10T14:07:02.8186478Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8187427Z 
2021-08-10T14:07:02.8189461Z self = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84ac3d0350>
2021-08-10T14:07:02.8191652Z pretest = False
2021-08-10T14:07:02.8192324Z 
2021-08-10T14:07:02.8194273Z     def _verifyIntfCounters(self, pretest=False):
2021-08-10T14:07:02.8196458Z         """
2021-08-10T14:07:02.8198828Z         Collect counters before and after the test and verify them
2021-08-10T14:07:02.8201172Z     
2021-08-10T14:07:02.8203211Z         Args:
2021-08-10T14:07:02.8205434Z             pretest(bool): collect counters before or after the test run
2021-08-10T14:07:02.8207789Z         """
2021-08-10T14:07:02.8209968Z         stats = self._parseCntrs()
2021-08-10T14:07:02.8212159Z         for key, value in self.pkt_map.items():
2021-08-10T14:07:02.8214329Z             if pretest:
2021-08-10T14:07:02.8216749Z                 self.pre_rx_drops[value] = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8219054Z             else:
2021-08-10T14:07:02.8221372Z                 actual_cnt = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8223733Z                 exp_cnt = self.pre_rx_drops[value] + TEST_PKT_CNT
2021-08-10T14:07:02.8226114Z                 pytest_assert(actual_cnt >= exp_cnt,
2021-08-10T14:07:02.8228594Z >                             "Pkt dropped cnt incorrect for intf {}. Expected: {}, Obtained: {}".format(value, exp_cnt, actual_cnt))
2021-08-10T14:07:02.8231197Z E               Failed: Pkt dropped cnt incorrect for intf Ethernet116. Expected: 10, Obtained: 0
2021-08-10T14:07:02.8232187Z 
2021-08-10T14:07:02.8234347Z actual_cnt = 0
2021-08-10T14:07:02.8236686Z exp_cnt    = 10
2021-08-10T14:07:02.8239695Z key        = <Ether  dst=d4:af:f7:4d:af:18 src=3e:44:f2:db:5a:1f type=0x800 |<IP  ihl=None ... |<Raw  load='tests.pfc.test_unknown_mac tests.pfc.test_unknown_mac test' |>>>>
2021-08-10T14:07:02.8242350Z pretest    = False
2021-08-10T14:07:02.8244656Z self       = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84ac3d0350>
2021-08-10T14:07:02.8248186Z stats      = {'Ethernet0': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, 'Ethernet100': {'RX_BPS': '0.00...: '0', 'RX_OK': '0', ...}, 'Ethernet108': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, ...}
2021-08-10T14:07:02.8251076Z value      = u'Ethernet116'
2021-08-10T14:07:02.8251760Z 
2021-08-10T14:07:02.8253649Z pfc/test_unknown_mac.py:290: Failed
2021-08-10T14:07:02.8255994Z ___________________ TestUnknownMac.test_unknown_mac[dscp-4] ____________________
2021-08-10T14:07:02.8256948Z 
2021-08-10T14:07:02.8258968Z self = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84acbfa750>
2021-08-10T14:07:02.8262244Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8265067Z dscp = 'dscp-4'
2021-08-10T14:07:02.8267145Z duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8269522Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8271802Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8272902Z 
2021-08-10T14:07:02.8275081Z     @pytest.mark.parametrize("dscp", ["dscp-3", "dscp-4", "dscp-8"])
2021-08-10T14:07:02.8283462Z     def test_unknown_mac(self, unknownMacSetup, dscp, duthosts, rand_one_dut_hostname, ptfadapter):
2021-08-10T14:07:02.8285946Z         """
2021-08-10T14:07:02.8288120Z         Verify unknown mac behavior for lossless and lossy priority
2021-08-10T14:07:02.8290524Z     
2021-08-10T14:07:02.8292790Z         This test ensures that packets send on lossless and lossy priority get dropped
2021-08-10T14:07:02.8295390Z         when the arp to mac mapping is present in the arp table and mac to port mapping
2021-08-10T14:07:02.8297737Z         is absent in the mac table
2021-08-10T14:07:02.8299816Z     
2021-08-10T14:07:02.8301810Z         Args:
2021-08-10T14:07:02.8304090Z             unknownMacSetup(fixture) : module scope autouse fixture for test setup
2021-08-10T14:07:02.8306501Z             dscp(string) : parametrized values for dscp
2021-08-10T14:07:02.8308839Z             duthosts(AnsibleHost) : multi dut instance
2021-08-10T14:07:02.8311290Z             rand_one_dut_hostname(AnsibleHost) : one of the dut instances from the multi dut
2021-08-10T14:07:02.8313607Z             ptfadapter(dataplane) : ptf runner instance
2021-08-10T14:07:02.8315751Z         """
2021-08-10T14:07:02.8318017Z         setup = unknownMacSetup
2021-08-10T14:07:02.8320438Z         self.dscp = int(dscp.split("-")[-1])
2021-08-10T14:07:02.8322701Z         self.duthost = duthosts[rand_one_dut_hostname]
2021-08-10T14:07:02.8325037Z         self.ptfadapter = ptfadapter
2021-08-10T14:07:02.8327603Z         self.dst_port = setup['dst_port']
2021-08-10T14:07:02.8330094Z         self.ptf_dst_port = setup['ptf_dst_port']
2021-08-10T14:07:02.8332662Z         self.dst_ip = setup['vlan']['hostip']
2021-08-10T14:07:02.8335029Z         self.vlan_ports = setup['vlan']['ports']
2021-08-10T14:07:02.8337582Z         self.ptf_vlan_ports = setup['ptf_vlan_ports']
2021-08-10T14:07:02.8340020Z         self.pc_intfs = setup['pc_intfs']
2021-08-10T14:07:02.8342318Z         self.ptf_pc_ports = setup['ptf_pc_ports']
2021-08-10T14:07:02.8344560Z         self.validateEntries()
2021-08-10T14:07:02.8346572Z >       self.run()
2021-08-10T14:07:02.8347298Z 
2021-08-10T14:07:02.8349430Z dscp       = 'dscp-4'
2021-08-10T14:07:02.8351640Z duthosts   = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8354534Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8357172Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8359535Z self       = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84acbfa750>
2021-08-10T14:07:02.8363020Z setup      = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8367118Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8368729Z 
2021-08-10T14:07:02.8370751Z pfc/test_unknown_mac.py:342: 
2021-08-10T14:07:02.8373010Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8375383Z pfc/test_unknown_mac.py:359: in run
2021-08-10T14:07:02.8377605Z     thandle.runTest()
2021-08-10T14:07:02.8379765Z pfc/test_unknown_mac.py:310: in runTest
2021-08-10T14:07:02.8382045Z     self._verifyIntfCounters()
2021-08-10T14:07:02.8384321Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8385328Z 
2021-08-10T14:07:02.8387478Z self = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84ac417550>
2021-08-10T14:07:02.8389777Z pretest = False
2021-08-10T14:07:02.8390473Z 
2021-08-10T14:07:02.8392637Z     def _verifyIntfCounters(self, pretest=False):
2021-08-10T14:07:02.8394870Z         """
2021-08-10T14:07:02.8397155Z         Collect counters before and after the test and verify them
2021-08-10T14:07:02.8399407Z     
2021-08-10T14:07:02.8401370Z         Args:
2021-08-10T14:07:02.8403493Z             pretest(bool): collect counters before or after the test run
2021-08-10T14:07:02.8405754Z         """
2021-08-10T14:07:02.8407772Z         stats = self._parseCntrs()
2021-08-10T14:07:02.8409962Z         for key, value in self.pkt_map.items():
2021-08-10T14:07:02.8412013Z             if pretest:
2021-08-10T14:07:02.8414281Z                 self.pre_rx_drops[value] = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8416444Z             else:
2021-08-10T14:07:02.8418529Z                 actual_cnt = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8420745Z                 exp_cnt = self.pre_rx_drops[value] + TEST_PKT_CNT
2021-08-10T14:07:02.8422890Z                 pytest_assert(actual_cnt >= exp_cnt,
2021-08-10T14:07:02.8425374Z >                             "Pkt dropped cnt incorrect for intf {}. Expected: {}, Obtained: {}".format(value, exp_cnt, actual_cnt))
2021-08-10T14:07:02.8428105Z E               Failed: Pkt dropped cnt incorrect for intf Ethernet120. Expected: 10, Obtained: 0
2021-08-10T14:07:02.8429325Z 
2021-08-10T14:07:02.8431283Z actual_cnt = 0
2021-08-10T14:07:02.8433304Z exp_cnt    = 10
2021-08-10T14:07:02.8436239Z key        = <Ether  dst=d4:af:f7:4d:af:18 src=a2:ac:4c:81:53:21 type=0x800 |<IP  ihl=None ... |<Raw  load='tests.pfc.test_unknown_mac tests.pfc.test_unknown_mac test' |>>>>
2021-08-10T14:07:02.8439190Z pretest    = False
2021-08-10T14:07:02.8441598Z self       = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84ac417550>
2021-08-10T14:07:02.8445092Z stats      = {'Ethernet0': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, 'Ethernet100': {'RX_BPS': '0.00...: '0', 'RX_OK': '0', ...}, 'Ethernet108': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, ...}
2021-08-10T14:07:02.8452862Z value      = u'Ethernet120'
2021-08-10T14:07:02.8453602Z 
2021-08-10T14:07:02.8455549Z pfc/test_unknown_mac.py:290: Failed
2021-08-10T14:07:02.8458017Z ___________________ TestUnknownMac.test_unknown_mac[dscp-8] ____________________
2021-08-10T14:07:02.8458992Z 
2021-08-10T14:07:02.8461016Z self = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84ac904450>
2021-08-10T14:07:02.8464325Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8467200Z dscp = 'dscp-8'
2021-08-10T14:07:02.8469260Z duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8471635Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8473919Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8474905Z 
2021-08-10T14:07:02.8477389Z     @pytest.mark.parametrize("dscp", ["dscp-3", "dscp-4", "dscp-8"])
2021-08-10T14:07:02.8480047Z     def test_unknown_mac(self, unknownMacSetup, dscp, duthosts, rand_one_dut_hostname, ptfadapter):
2021-08-10T14:07:02.8482409Z         """
2021-08-10T14:07:02.8484510Z         Verify unknown mac behavior for lossless and lossy priority
2021-08-10T14:07:02.8486725Z     
2021-08-10T14:07:02.8488977Z         This test ensures that packets send on lossless and lossy priority get dropped
2021-08-10T14:07:02.8491558Z         when the arp to mac mapping is present in the arp table and mac to port mapping
2021-08-10T14:07:02.8493896Z         is absent in the mac table
2021-08-10T14:07:02.8495935Z     
2021-08-10T14:07:02.8497869Z         Args:
2021-08-10T14:07:02.8500134Z             unknownMacSetup(fixture) : module scope autouse fixture for test setup
2021-08-10T14:07:02.8502687Z             dscp(string) : parametrized values for dscp
2021-08-10T14:07:02.8504981Z             duthosts(AnsibleHost) : multi dut instance
2021-08-10T14:07:02.8507539Z             rand_one_dut_hostname(AnsibleHost) : one of the dut instances from the multi dut
2021-08-10T14:07:02.8509938Z             ptfadapter(dataplane) : ptf runner instance
2021-08-10T14:07:02.8512159Z         """
2021-08-10T14:07:02.8514152Z         setup = unknownMacSetup
2021-08-10T14:07:02.8516495Z         self.dscp = int(dscp.split("-")[-1])
2021-08-10T14:07:02.8518662Z         self.duthost = duthosts[rand_one_dut_hostname]
2021-08-10T14:07:02.8520905Z         self.ptfadapter = ptfadapter
2021-08-10T14:07:02.8523157Z         self.dst_port = setup['dst_port']
2021-08-10T14:07:02.8525429Z         self.ptf_dst_port = setup['ptf_dst_port']
2021-08-10T14:07:02.8527804Z         self.dst_ip = setup['vlan']['hostip']
2021-08-10T14:07:02.8530232Z         self.vlan_ports = setup['vlan']['ports']
2021-08-10T14:07:02.8532608Z         self.ptf_vlan_ports = setup['ptf_vlan_ports']
2021-08-10T14:07:02.8534999Z         self.pc_intfs = setup['pc_intfs']
2021-08-10T14:07:02.8537259Z         self.ptf_pc_ports = setup['ptf_pc_ports']
2021-08-10T14:07:02.8539468Z         self.validateEntries()
2021-08-10T14:07:02.8541552Z >       self.run()
2021-08-10T14:07:02.8542247Z 
2021-08-10T14:07:02.8544356Z dscp       = 'dscp-8'
2021-08-10T14:07:02.8546503Z duthosts   = <tests.common.devices.duthosts.DutHosts object at 0x7f84b7e335d0>
2021-08-10T14:07:02.8549091Z ptfadapter = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>
2021-08-10T14:07:02.8551608Z rand_one_dut_hostname = 'str2-7050cx3-acs-07'
2021-08-10T14:07:02.8553938Z self       = <tests.pfc.test_unknown_mac.TestUnknownMac object at 0x7f84ac904450>
2021-08-10T14:07:02.8557623Z setup      = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8561645Z unknownMacSetup = {'dst_port': u'Ethernet88', 'pc_intfs': [u'Ethernet112', u'Ethernet120', u'Ethernet116', u'Ethernet124'], 'ptf_dst_por...0.1.59'), u'Ethernet120': (33, u'Ethernet120', u'10.0.1.61'), u'Ethernet124': (35, u'Ethernet124', u'10.0.1.63')}, ...}
2021-08-10T14:07:02.8563210Z 
2021-08-10T14:07:02.8565177Z pfc/test_unknown_mac.py:342: 
2021-08-10T14:07:02.8567407Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8569712Z pfc/test_unknown_mac.py:359: in run
2021-08-10T14:07:02.8571764Z     thandle.runTest()
2021-08-10T14:07:02.8573765Z pfc/test_unknown_mac.py:310: in runTest
2021-08-10T14:07:02.8575842Z     self._verifyIntfCounters()
2021-08-10T14:07:02.8578073Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-08-10T14:07:02.8579064Z 
2021-08-10T14:07:02.8581166Z self = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84afbbc550>
2021-08-10T14:07:02.8583415Z pretest = False
2021-08-10T14:07:02.8584107Z 
2021-08-10T14:07:02.8586117Z     def _verifyIntfCounters(self, pretest=False):
2021-08-10T14:07:02.8588294Z         """
2021-08-10T14:07:02.8590354Z         Collect counters before and after the test and verify them
2021-08-10T14:07:02.8592560Z     
2021-08-10T14:07:02.8594501Z         Args:
2021-08-10T14:07:02.8596735Z             pretest(bool): collect counters before or after the test run
2021-08-10T14:07:02.8599014Z         """
2021-08-10T14:07:02.8600985Z         stats = self._parseCntrs()
2021-08-10T14:07:02.8603083Z         for key, value in self.pkt_map.items():
2021-08-10T14:07:02.8605221Z             if pretest:
2021-08-10T14:07:02.8607559Z                 self.pre_rx_drops[value] = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8609831Z             else:
2021-08-10T14:07:02.8611995Z                 actual_cnt = int(stats[value]['RX_DRP'])
2021-08-10T14:07:02.8619006Z                 exp_cnt = self.pre_rx_drops[value] + TEST_PKT_CNT
2021-08-10T14:07:02.8621536Z                 pytest_assert(actual_cnt >= exp_cnt,
2021-08-10T14:07:02.8624188Z >                             "Pkt dropped cnt incorrect for intf {}. Expected: {}, Obtained: {}".format(value, exp_cnt, actual_cnt))
2021-08-10T14:07:02.8626957Z E               Failed: Pkt dropped cnt incorrect for intf Ethernet116. Expected: 10, Obtained: 0
2021-08-10T14:07:02.8627996Z 
2021-08-10T14:07:02.8629966Z actual_cnt = 0
2021-08-10T14:07:02.8632071Z exp_cnt    = 10
2021-08-10T14:07:02.8634991Z key        = <Ether  dst=d4:af:f7:4d:af:18 src=3e:44:f2:db:5a:1f type=0x800 |<IP  ihl=None ... |<Raw  load='tests.pfc.test_unknown_mac tests.pfc.test_unknown_mac test' |>>>>
2021-08-10T14:07:02.8637892Z pretest    = False
2021-08-10T14:07:02.8640219Z self       = <tests.pfc.test_unknown_mac.TrafficSendVerify object at 0x7f84afbbc550>
2021-08-10T14:07:02.8643845Z stats      = {'Ethernet0': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, 'Ethernet100': {'RX_BPS': '0.00...: '0', 'RX_OK': '0', ...}, 'Ethernet108': {'RX_BPS': '0.00 B/s', 'RX_DRP': '0', 'RX_ERR': '0', 'RX_OK': '0', ...}, ...}
2021-08-10T14:07:02.8646735Z value      = u'Ethernet116'
2021-08-10T14:07:02.8647444Z 
2021-08-10T14:07:02.8649450Z pfc/test_unknown_mac.py:290: Failed
2021-08-10T14:07:02.8651959Z - generated xml file: /azp/agent/_work/8/s/tests/logs/pfc/test_unknown_mac.xml -
2021-08-10T14:07:02.8654541Z =========================== short test summary info ============================
2021-08-10T14:07:02.8657272Z FAILED pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-3] - Fa...
2021-08-10T14:07:02.8660056Z FAILED pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-4] - Fa...
2021-08-10T14:07:02.8662966Z FAILED pfc/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-8] - Fa...
2021-08-10T14:07:02.8665570Z ========================== 3 failed in 233.15 seconds ==========================

Describe the results you expected:

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

lguohan commented 3 years ago

unknown mac only failed for dscp 3, 4, 8.

bingwang-ms commented 3 years ago

The issue was also observed on SN4600 T0 testbed. But the error is a little bit different. For dscp 3 and dscp 4, the packets were dropped, but drop counter didn't increase as expected. For dscp 8, the packet was forwarded according to FDB table before clear, and drop counter didn't show packet drop either.