Skip to content

Commit 8ea4d3c

Browse files
Xichen96mssonicbld
authored andcommitted
[dhcp_relay] ignore mem checker with stress test (sonic-net#21598)
What is the motivation for this PR? Test produce mem checker failure and we dont want that. How did you do it? Add ignore loganalyzer How did you verify/test it? Run test, and passed Signed-off-by: Xichen Lin <[email protected]>
1 parent c72623b commit 8ea4d3c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/dhcp_relay/test_dhcp_counter_stress.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
DEFAULT_PACKET_RATE_PER_SEC = 25
3030

3131

32+
@pytest.fixture(autouse=True)
33+
def ignore_expected_loganalyzer_exceptions(rand_one_dut_hostname, loganalyzer):
34+
"""Ignore expected failures logs during test execution."""
35+
if loganalyzer:
36+
ignoreRegex = [
37+
r".*ERR memory_threshold_check: Free memory [.\d]+ is less then free memory threshold [.\d]+",
38+
]
39+
loganalyzer[rand_one_dut_hostname].ignore_regex.extend(ignoreRegex)
40+
41+
yield
42+
43+
3244
@pytest.mark.parametrize('dhcp_type', ['discover', 'offer', 'request', 'ack'])
3345
def test_dhcpcom_relay_counters_stress(ptfhost, ptfadapter, dut_dhcp_relay_data, validate_dut_routes_exist,
3446
testing_config, setup_standby_ports_on_rand_unselected_tor,

0 commit comments

Comments
 (0)