Skip to content

[everflow] test_everflow_dscp_with_policer test failed due to movement to python3 #16087

@AntonHryshchuk

Description

@AntonHryshchuk

Issue Description

After movement to python3, everflow test test_everflow_dscp_with_police failed.

Detected 2 issues:

 File "acstests/everflow_policer_test.py", line 183, in checkOriginalFlow
    testutils.send_packet(self, self.src_port, **str(self.base_pkt)**, count=self.NUM_OF_TOTAL_PACKETS)
  File "/root/env-python3/lib/python3.7/site-packages/ptf/testutils.py", line 3202, in send_packet
    pkt = bytes(pkt)
TypeError: string argument without an encoding

The fix for it is easy, in all places of testutils.send_packet call change to
testutils.send_packet(self, self.src_port, bytes(str(self.base_pkt), 'utf-8'), count=self.NUM_OF_TOTAL_PACKETS)

After fix of 1, the test still failing:

File "acstests/everflow_policer_test.py", line 324, in runTest
    count = self.checkOriginalFlow()
  File "acstests/everflow_policer_test.py", line 190, in checkOriginalFlow
    assert count > 0, assert_str    # Fast failure without waiting for full iteration
AssertionError: The first original packet is not received

Results you see

Test fail

Results you expected to see

Test pass

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions