|
10 | 10 | from tests.common.helpers.pfc_storm import PFCStorm |
11 | 11 | from tests.common.plugins.loganalyzer.loganalyzer import LogAnalyzer |
12 | 12 | from .files.pfcwd_helper import start_wd_on_ports |
| 13 | +from .files.pfcwd_helper import EXPECT_PFC_WD_DETECT_RE, EXPECT_PFC_WD_RESTORE_RE, fetch_vendor_specific_diagnosis_re |
13 | 14 | from tests.ptf_runner import ptf_runner |
14 | 15 | from tests.common import port_toggle |
15 | 16 | from tests.common import constants |
|
20 | 21 | PTF_PORT_MAPPING_MODE = 'use_orig_interface' |
21 | 22 |
|
22 | 23 | TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "templates") |
23 | | -EXPECT_PFC_WD_DETECT_RE = ".* detected PFC storm .*" |
24 | | -EXPECT_PFC_WD_RESTORE_RE = ".*storm restored.*" |
25 | 24 | WD_ACTION_MSG_PFX = {"dontcare": "Verify PFCWD detection when queue buffer is not empty " |
26 | 25 | "and proper function of pfcwd drop action", |
27 | 26 | "drop": "Verify proper function of pfcwd drop action", |
@@ -671,7 +670,7 @@ def storm_detect_path(self, dut, port, action): |
671 | 670 | reg_exp = loganalyzer.parse_regexp_file(src=ignore_file) |
672 | 671 | loganalyzer.ignore_regex.extend(reg_exp) |
673 | 672 | loganalyzer.expect_regex = [] |
674 | | - loganalyzer.expect_regex.extend([EXPECT_PFC_WD_DETECT_RE]) |
| 673 | + loganalyzer.expect_regex.extend([EXPECT_PFC_WD_DETECT_RE + fetch_vendor_specific_diagnosis_re(dut)]) |
675 | 674 | loganalyzer.match_regex = [] |
676 | 675 |
|
677 | 676 | if action != "dontcare": |
@@ -1067,7 +1066,7 @@ def test_pfcwd_port_toggle(self, request, fake_storm, setup_pfc_test, setup_dut_ |
1067 | 1066 | reg_exp = loganalyzer.parse_regexp_file(src=ignore_file) |
1068 | 1067 | loganalyzer.ignore_regex.extend(reg_exp) |
1069 | 1068 | loganalyzer.expect_regex = [] |
1070 | | - loganalyzer.expect_regex.extend([EXPECT_PFC_WD_DETECT_RE]) |
| 1069 | + loganalyzer.expect_regex.extend([EXPECT_PFC_WD_DETECT_RE + fetch_vendor_specific_diagnosis_re(duthost)]) |
1071 | 1070 | loganalyzer.match_regex = [] |
1072 | 1071 |
|
1073 | 1072 | port_toggle(self.dut, tbinfo, ports=[port]) |
|
0 commit comments