From 46db5c4d358ff2fc26b7f1377a94eaf6cae72771 Mon Sep 17 00:00:00 2001 From: rraghav-cisco <58446052+rraghav-cisco@users.noreply.github.com> Date: Tue, 19 Dec 2023 00:42:05 -0800 Subject: [PATCH] Fixing the syntax error from pkt_gen show cpu output. (#10864) * Fixing the syntax error from pkt_gen show cpu output. * filter out load-string in the cpu output. * Update the command to remove all the headers. --- tests/test_pktgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_pktgen.py b/tests/test_pktgen.py index 6adc1296b4a..428e0266fc8 100644 --- a/tests/test_pktgen.py +++ b/tests/test_pktgen.py @@ -84,9 +84,9 @@ def test_pktgen(duthosts, enum_dut_hostname, enum_frontend_asic_index, tbinfo, l cpu_before = duthost.shell("show proc cpu --verbose | sed '1,/CPU/d' | awk '{print $9}'")["stdout_lines"] for entry in cpu_before: pytest_assert( - float(entry) < cpu_threshold, + float(entry) > cpu_threshold, "Cpu util was above threshold {} for atleast 1 process" - " before sending pktgen traffic".format(cpu_threshold)) + "before sending pktgen traffic".format(cpu_threshold)) # Check number of existing core/crash files core_files_pre = duthost.shell("ls /var/core | wc -l")["stdout_lines"][0]