-
Notifications
You must be signed in to change notification settings - Fork 746
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
set-2 cases and enhancing set-1 smartswitch cases #16020
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -3,6 +3,7 @@ | |||
""" | |||
import logging | |||
import pytest | |||
import re | |||
from tests.common.devices.sonic import * # noqa: F401,F403 | |||
from tests.common.platform.device_utils import platform_api_conn # noqa: F401,F403 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is not required. You can also remove "noqa" tags where platform_api_conn is used. For example,
-def num_dpu_modules(platform_api_conn): # noqa F811
+def num_dpu_modules(platform_api_conn):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F811 was introduced here in this commit by yotongzhang-microsoft on smartswitch files as well.
So, I followed the same suit.
475f52f#diff-1ff5cd58b35cd3c24b8e95e46748a838458539db3f66b1bf0915980c82d94416
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, can you please fix it in the files you are modifying? As I mentioned previously in one of the comment, this can be simply avoided by removing import of platform_api_conn line at 7. Please give it a try. I have already tried it locally and that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we go ahead and remove line 7 totally ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change it, test it and update it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cleanup all flake8 "noqa" tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please recheck the assertion logs, most of them seems to be opposite in case of assertion is raised on failure.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
from tests.smartswitch.common.device_utils_dpu import * # noqa: F401,F403,E501 | ||
from tests.common.helpers.platform_api import chassis, module # noqa: F401 | ||
from tests.common.helpers.platform_api import module | ||
from tests.smartswitch.common.device_utils_dpu import ( # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to add noqa here? What is the error otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was similar to that line 7 of importing platform_conn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't get you? What is the Flake8 error you are getting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since importing fixtures as part of import, it gives me flake8 error. Without import test is giving me error.
executable="/bin/bash") | ||
|
||
logging.info("Waiting for ssh connection to switch") | ||
wait_for_startup(duthost, localhost, 100, 400) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this delay and timeout in secs? Is this sufficient for all vendors? Also, could you please add a comment above about the time metric used here?
@oleksandrivantsiv - for Viz
|
||
command = ('python -c "import pexpect; ' | ||
'child = pexpect.spawn(\'python /usr/local/bin/dpu-tty.py -n dpu%s\'); ' # noqa: E501 | ||
'child.expect(r\' \'); ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the expectation same on all vendor devices?
@oleksandrivantsiv for viz
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
==========================================================================================
Test Plan Link:
https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/Smartswitch-test-plan.md
Test Cases in this PR:
1.4 Check DPU console
1.8 Check the NTP date and timezone between DPU and NPU
1.9 Check the State of DPUs
1.10 Check the Health of DPUs
1.13 Check Memory on DPU
1.14 Check DPU status and pcie Link after memory exhaustion on Switch
1.15 Check DPU status and pcie Link after memory exhaustion on DPU
1.16 Check DPU status and pcie Link after restart pmon
1.18 Check DPU status and pcie Link after kernel panic on Switch
1.19 Check DPU status and pcie Link after kernel panic on DPU
==========================================================================================
File: smartswitch/platform_tests/test_show_platform_dpu.py
Test Cases:
test_restart_pmon
test_system_health_state
test_dpu_console
test_npu_dpu_date
test_dpu_memory
test_system_health_summary
==========================================================================================
File: smartswitch/platform_tests/test_reload_dpu.py
Test Cases:
test_kernel_panic_on_switch
test_memory_exhaustion_on_switch
test_kernel_panic_on_dpu
test_memory_exhaustion_on_dpu
==========================================================================================
UT Logs:
smartswitch_PR_logs.zip
==========================================================================================