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

[Snappi] [Bug]: TypeError in multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py #15799

Open
sdszhang opened this issue Nov 28, 2024 · 1 comment

Comments

@sdszhang
Copy link
Contributor

sdszhang commented Nov 28, 2024

Issue Description

snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-xxxxxx-lc1-1|0]
-------------------------------- live log call ---------------------------------
15:33:38 init.pytest_runtest_call L0040 ERROR | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 1788, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_hooks.py", line 513, in call
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.traceback)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/var/src/xxxixia_669de75fbbfea63e8b73b319/tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py", line 70, in test_pfc_pause_single_lossy_prio
run_pfc_test(api=snappi_api,
File "/var/src/xxxixia_669de75fbbfea63e8b73b319/tests/snappi_tests/multidut/pfc/files/multidut_helper.py", line 270, in run_pfc_test
verify_basic_test_flow(flow_metrics=tgen_flow_stats,
File "/var/src/xxxixia_669de75fbbfea63e8b73b319/tests/common/snappi_tests/traffic_generation.py", line 533, in verify_basic_test_flow
exp_test_flow_rx_pkts = data_flow_config["flow_rate_percent"] / 100.0 * speed_gbps
TypeError: unsupported operand type(s) for /: 'dict' and 'float'

data_flow_config["flow_rate_percent"] is assigned as dictionary in #15589, and result in this error.

Results you see

data type error

Results you expected to see

test case should pass.

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

yejianquan pushed a commit that referenced this issue Dec 1, 2024
Description of PR
Summary:
Fixes # (issue)


Approach
What is the motivation for this PR?
Issue #15799

How did you do it?
Made code changes

How did you verify/test it?
Verified on a Ixia run

------------------------------------------------------------------------------------------------------------------------------------ live log sessionfinish -------------------------------------------------------------------------------------------------------------------------------------
22:33:44 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
==================================================================================================================================== short test summary info ====================================================================================================================================
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|6]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|6]
========================================================================================================================= 

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this issue Dec 1, 2024
…15800)

Description of PR
Summary:
Fixes # (issue)


Approach
What is the motivation for this PR?
Issue sonic-net#15799

How did you do it?
Made code changes

How did you verify/test it?
Verified on a Ixia run

------------------------------------------------------------------------------------------------------------------------------------ live log sessionfinish -------------------------------------------------------------------------------------------------------------------------------------
22:33:44 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
==================================================================================================================================== short test summary info ====================================================================================================================================
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|6]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|6]
========================================================================================================================= 

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this issue Dec 2, 2024
Description of PR
Summary:
Fixes # (issue)


Approach
What is the motivation for this PR?
Issue #15799

How did you do it?
Made code changes

How did you verify/test it?
Verified on a Ixia run

------------------------------------------------------------------------------------------------------------------------------------ live log sessionfinish -------------------------------------------------------------------------------------------------------------------------------------
22:33:44 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
==================================================================================================================================== short test summary info ====================================================================================================================================
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info0-aaa14-ixia-m64|6]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|0]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|1]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|2]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|5]
PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossy_with_snappi.py::test_pfc_pause_single_lossy_prio[multidut_port_info1-aaa14-ixia-m64|6]
========================================================================================================================= 

co-authorized by: [email protected]
@yxieca
Copy link
Collaborator

yxieca commented Dec 11, 2024

@sdszhang there seems to be a fix already? Can this issue be closed now?

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

No branches or pull requests

2 participants