Skip to content

Use is_python3=True in test_ipinip_hash_negative ptf_runner#13326

Merged
wangxin merged 1 commit intosonic-net:masterfrom
arista-nwolfe:master-fib-test-non-py3
Jun 18, 2024
Merged

Use is_python3=True in test_ipinip_hash_negative ptf_runner#13326
wangxin merged 1 commit intosonic-net:masterfrom
arista-nwolfe:master-fib-test-non-py3

Conversation

@arista-nwolfe
Copy link
Copy Markdown
Contributor

Description of PR

test_ipinip_hash_negative was using ptf_runner without passing is_python3=True.
This resulted in some code which did string formatting unique to Python3 to assert:

"Traceback (most recent call last):"
"  File \"/usr/bin/ptf\", line 522, in <module>"
"    test_modules = load_test_modules(config)"
"  File \"/usr/bin/ptf\", line 413, in load_test_modules"
"    mod = imp.load_module(modname, *imp.find_module(modname, [root]))"
"  File \"ptftests/py3/pfc_wd_background_traffic.py\", line 40"
"    print(f\"traffic from {src_port} to {dst_port}: {queue} \")"
"                                                           ^"
"SyntaxError: invalid syntax"]

Summary:
Fixes #13313

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

@wangxin wangxin requested a review from opcoder0 June 18, 2024 00:47
@wangxin wangxin merged commit a5b63ed into sonic-net:master Jun 18, 2024
@kenneth-arista
Copy link
Copy Markdown
Contributor

@arlakshm can you help add a label to backport to 202405?

@arlakshm
Copy link
Copy Markdown
Contributor

arlakshm commented Jul 8, 2024

@bingwang-ms, @wangxin, can you help cherry-pick this fix in 202405

@CharudattaSChitale
Copy link
Copy Markdown
Contributor

Can we merge this PR in 202311 Also?
Same failure is seen in 202311 also

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 30, 2024
…t#13326)

test_ipinip_hash_negative was using ptf_runner without passing is_python3=True.
This resulted in some code which did string formatting unique to Python3 to assert:

"Traceback (most recent call last):"
"  File \"/usr/bin/ptf\", line 522, in <module>"
"    test_modules = load_test_modules(config)"
"  File \"/usr/bin/ptf\", line 413, in load_test_modules"
"    mod = imp.load_module(modname, *imp.find_module(modname, [root]))"
"  File \"ptftests/py3/pfc_wd_background_traffic.py\", line 40"
"    print(f\"traffic from {src_port} to {dst_port}: {queue} \")"
"                                                           ^"
"SyntaxError: invalid syntax"]

Summary:
Fixes sonic-net#13313
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #13881

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 30, 2024
…t#13326)

test_ipinip_hash_negative was using ptf_runner without passing is_python3=True.
This resulted in some code which did string formatting unique to Python3 to assert:

"Traceback (most recent call last):"
"  File \"/usr/bin/ptf\", line 522, in <module>"
"    test_modules = load_test_modules(config)"
"  File \"/usr/bin/ptf\", line 413, in load_test_modules"
"    mod = imp.load_module(modname, *imp.find_module(modname, [root]))"
"  File \"ptftests/py3/pfc_wd_background_traffic.py\", line 40"
"    print(f\"traffic from {src_port} to {dst_port}: {queue} \")"
"                                                           ^"
"SyntaxError: invalid syntax"]

Summary:
Fixes sonic-net#13313
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #13882

mssonicbld pushed a commit that referenced this pull request Jul 30, 2024
test_ipinip_hash_negative was using ptf_runner without passing is_python3=True.
This resulted in some code which did string formatting unique to Python3 to assert:

"Traceback (most recent call last):"
"  File \"/usr/bin/ptf\", line 522, in <module>"
"    test_modules = load_test_modules(config)"
"  File \"/usr/bin/ptf\", line 413, in load_test_modules"
"    mod = imp.load_module(modname, *imp.find_module(modname, [root]))"
"  File \"ptftests/py3/pfc_wd_background_traffic.py\", line 40"
"    print(f\"traffic from {src_port} to {dst_port}: {queue} \")"
"                                                           ^"
"SyntaxError: invalid syntax"]

Summary:
Fixes #13313
mssonicbld pushed a commit that referenced this pull request Jul 30, 2024
test_ipinip_hash_negative was using ptf_runner without passing is_python3=True.
This resulted in some code which did string formatting unique to Python3 to assert:

"Traceback (most recent call last):"
"  File \"/usr/bin/ptf\", line 522, in <module>"
"    test_modules = load_test_modules(config)"
"  File \"/usr/bin/ptf\", line 413, in load_test_modules"
"    mod = imp.load_module(modname, *imp.find_module(modname, [root]))"
"  File \"ptftests/py3/pfc_wd_background_traffic.py\", line 40"
"    print(f\"traffic from {src_port} to {dst_port}: {queue} \")"
"                                                           ^"
"SyntaxError: invalid syntax"]

Summary:
Fixes #13313
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
* [yang] Change swss-event, dhcp-relay-event leafref to string (sonic-net#13326)

Why I did it
Do not require leafref as part of yang. Only need string to compare whether string received from event matches what is possible for ifname.

How I did it
How to verify it
Run UT

* Add fix to monit_regex.json for catching mem_usage and cpu_usage (sonic-net#14954)

Why I did it
Current regex not able to capture logs, modify regex to capture syslog messages

Work item tracking
Microsoft ADO (number only): 13366345
How I did it
Code change

How to verify it
sonic-mgmt test case

* Update usage leaf in sonic-events-host yang models (sonic-net#15805)

#### Why I did it

event yang models for usage currently use int as type for usage leaf, needs to be of type decimal64

##### Work item tracking
- Microsoft ADO **(number only)**:17747466

#### How I did it

Update yang models and UT

#### How to verify it

UT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Bug]: fib/test_fib.py::test_ipinip_hash_negative fails due to ptf_runner not specifying is_python3=True

7 participants