Conversation
f85b10b to
de5beb6
Compare
|
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Anton <antonh@nvidia.com>
de5beb6 to
f6e6efc
Compare
|
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
@ZhaohuiS please see this fix. Can you please check how tests passed on the original pr that as a result the test cannot pass? |
@liat-grozovik Just merged this PR. qos test cases kept failing internally for long time, the reason I submitted #6787 is saithrift(imported in ptf qos scripts) is built for python3, but related qos test cases are not transformed to python3. So, I did migration. But previous cases were kept failing, I don't have result to compare, I checked setup phase and it passed. I didn't verify each case result. I am thinking to fix setup part firstly to unblock test running and then if there is something new failure, let's fix them step by step. |
Description of PR Summary: Fix after moving the test to python3. Fix for [QoS] some sai qos test failed after moving to python3 #6787 The number of packets to send is the float value: " File \"saitests/py3/sai_qos_tests.py\", line 2552, in runTest", " File \"/root/env-python3/lib/python3.7/site-packages/ptf/testutils.py\", line 3202, in send_packet", " for n in range(count):", "TypeError: 'float' object cannot be interpreted as an integer" python2: 3/2=1 python3: 3/2=1.5 "/" in python2 == "//" in python3 Changed in places when calculating the number of packets from "/" to "//" Fix ignore in test_mark_conditions.yaml: the test testQosSaiHeadroomPoolWatermark[r-tigon-04-None] not matched by condition testQosSaiHeadroomPoolWatermark[None] Removed "[None]" Fixed error in the test testQosSaiPgHeadroomWatermark[r-tigon-04-None] print(\"lower bound: %d, actual value: %d, upper bound: %d\" % (expected_wm - margin) * cell_size * cell_occupancy, pg_headroom_wm_res[pg], ((expected_wm + margin) * cell_size * cell_occupancy), file=sys.stderr)", "TypeError: not enough arguments for format string" Added missing "()", which is required in printing more than one parameter Signed-off-by: Anton <antonh@nvidia.com>
There is one line missing in sonic-net#6786, fix it.
In PR #6786, there was one line missed(line 2618) Need to use '//' instead of '/' for the floor division in python3. - What is the motivation for this PR? Fix a bug in qos sai test. - How did you do it? use '//' instead of '/' for the floor division in python3 - How did you verify/test it? Verified by automation, test passed.
In PR #6786, there was one line missed(line 2618) Need to use '//' instead of '/' for the floor division in python3. - What is the motivation for this PR? Fix a bug in qos sai test. - How did you do it? use '//' instead of '/' for the floor division in python3 - How did you verify/test it? Verified by automation, test passed.
…ic-mgmt into internal-202205 Fix merge conflicts. - Fix verify_no_packet_any call in fib_test (sonic-net#6461) - Fix the test case test_TSA failure when check the routes on the eos host (sonic-net#6483) - Use conditional mark to skip testcase instead of required_mocked_dualtor (sonic-net#6766) - [tagged_arp] fix issue 'fixture ports_list not found' (sonic-net#6773) - [QoS] fixes after moving to python3 (sonic-net#6786) - update parse funciton for image url (sonic-net#6848) - Fix typo in get_queue_counter (sonic-net#6852) - Revert "Fix loganalyzer.py UnicodeDecodeError (sonic-net#6524)" (sonic-net#6858) - Enhancing core_dump_and_config_check to be multi-asic aware (sonic-net#6527) - Adding support for calculating balancing in multi-lc/multi-asic case (Test_fib.py) (sonic-net#6391) - Support different RC in case of pre or post sanity check failed (sonic-net#6860) - Update getbuild.py to support pass an empty access_token - [202205] Fixing auto_techsupport (sonic-net#6882) - Merge branch 'azure-202205' into dev/yaqiangzhu/202205_manually_merge
Signed-off-by: Anton antonh@nvidia.com
Description of PR
Summary:
Fix for [QoS] some sai qos test failed after moving to python3 #6787
The number of packets to send is the float value:
python2: 3/2=1
python3: 3/2=1.5
"/" in python2 == "//" in python3
Changed in places when calculating the number of packets from "/" to "//"
Fix ignore in test_mark_conditions.yaml:
the test testQosSaiHeadroomPoolWatermark[r-tigon-04-None] not matched by condition testQosSaiHeadroomPoolWatermark[None]
Removed "[None]"
Fixed error in the test testQosSaiPgHeadroomWatermark[r-tigon-04-None]
print(\"lower bound: %d, actual value: %d, upper bound: %d\" % (expected_wm - margin) * cell_size * cell_occupancy, pg_headroom_wm_res[pg], ((expected_wm + margin) * cell_size * cell_occupancy), file=sys.stderr)", "TypeError: not enough arguments for format string"Added missing "()", which is required in printing more than one parameter
Type of change
Back port request
Approach
What is the motivation for this PR?
Stabilize the QoS tests
How did you do it?
fixed the relevant mistakes
How did you verify/test it?
Tests executed and passed
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation