Skip to content

Commit

Permalink
Check iperf result json format
Browse files Browse the repository at this point in the history
  • Loading branch information
kanchansenlaskar committed Nov 14, 2024
1 parent a8affe4 commit e51196e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lisa/tools/iperf3.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,12 @@ def create_iperf_udp_performance_message(
for client_result_raw in client_result_list:
# remove warning which will bring exception when load json
# warning: UDP block size 8192 exceeds TCP MSS 1406, may result in fragmentation / drops # noqa: E501
client_result = json.loads(self._pre_handle(client_result_raw.stdout))
try:
client_result = json.loads(self._pre_handle(client_result_raw.stdout))
except Exception as e:
raise LisaException(
f"fail to load json from iperf3 client result: {str(e)} \n {self._pre_handle(client_result_raw.stdout)}"
)
if (
"sum" in client_result["end"].keys()
and "lost_percent" in client_result["end"]["sum"].keys()
Expand Down

0 comments on commit e51196e

Please sign in to comment.