Skip to content

Fix for drop_packets tests failure#8506

Closed
sanjair-git wants to merge 1 commit intosonic-net:masterfrom
sanjair-git:drop_packets
Closed

Fix for drop_packets tests failure#8506
sanjair-git wants to merge 1 commit intosonic-net:masterfrom
sanjair-git:drop_packets

Conversation

@sanjair-git
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

  • After 'cherry-pick' of PR#2703 to 202205 branch, some of the 'drop_packets' test cases are failing with the following issue.
  • drop_packets error: > raise Exception("Failed to parse output of '{}', err={}".format(cli_cmd, str(err))) E Exception: Failed to parse output of 'portstat -j -n {} ', err=Extra data: line 274 column 1 - line 274 column 84 (char 6244 - 6327)
  • This PR fixes the above issue.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

  • To fix 'drop_packets' test case failure shown below,
  • drop_packets error: > raise Exception("Failed to parse output of '{}', err={}".format(cli_cmd, str(err))) E Exception: Failed to parse output of 'portstat -j -n {} ', err=Extra data: line 274 column 1 - line 274 column 84 (char 6244 - 6327)

How did you do it?

  • 'portstat -j -n asicX' command output (JSON) at the end has a statement "Reminder: Please execute 'show interface counters -d all' to include internal links".
  • JSON parsing fails due to this statement at the end of the output.
  • Test case is adjusted to ignore this statement and consider only the json output of the portstat command.

How did you verify/test it?

  • Ran the drop_packets test cases against a multi-asic line card in a T2 chassis.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

drop_packets

@wenyiz2021
Copy link
Contributor

Hi,
this is code issue, we should not expect the 'reminder' string if '-j' option is given, which expect only json format.
I have this PR fix in utilities repo:
sonic-net/sonic-utilities#2877

@wenyiz2021 wenyiz2021 closed this Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants