Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The random udp port in VxlanHashTest could be out of range #17223

Open
congh-nvidia opened this issue Feb 27, 2025 · 3 comments
Open

[Bug]: The random udp port in VxlanHashTest could be out of range #17223

congh-nvidia opened this issue Feb 27, 2025 · 3 comments
Labels

Comments

@congh-nvidia
Copy link
Contributor

Issue Type

Bug Report

Description

The range of udp port is [0, 65535], but in the test the random range is [0, 65536], which could cause failure:

ValueError: While dissecting field 'sport': Incorrect type of value for field sport:
struct.error(''H' format requires 0 <= number <= 65535')
To inject bytes into the field regardless of the type, use RawVal. See help(RawVal)

Issue Details

Theses 2 lines should be fixed:
https://github.com/sonic-net/sonic-mgmt/blame/master/ansible/roles/test/files/ptftests/py3/hash_test.py#L931
https://github.com/sonic-net/sonic-mgmt/blame/master/ansible/roles/test/files/ptftests/py3/hash_test.py#L1049

Impact or Proposed Behavior

Random failure in the vxlan hash test.

Importance or Severity

Critical

Is it platform specific

generic

Relevant log output

Output of show version

Attach files (if any)

No response

@mssonicbld mssonicbld added the bug label Feb 27, 2025
@congh-nvidia
Copy link
Contributor Author

Hi @kperumalbfn could you please take a look at this issue?
@bingwang-ms for awareness.

@bingwang-ms
Copy link
Collaborator

That's a good catch! Also saw the same issue in our test.

@kperumalbfn
Copy link
Contributor

Thanks @congh-nvidia. Fixed via #17258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants