Skip to content

Commit

Permalink
Fixing the syntax error from pkt_gen show cpu output. (sonic-net#10864)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
rraghav-cisco authored Dec 19, 2023
1 parent 5e1557a commit 46db5c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_pktgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 46db5c4

Please sign in to comment.