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

Add testcases for Reboot #16576

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Add testcases for Reboot #16576

wants to merge 8 commits into from

Conversation

hdwhdw
Copy link
Contributor

@hdwhdw hdwhdw commented Jan 17, 2025

Description of PR

Summary:

This PR test the features in:
gNOI Cold Reboot #20709 - Adding the framework docker in the sonic-buildimage
gNOI Cold Reboot - Integrated Rebootbackend changes #20710 - rebootbackend process code inside the framework docker
gNOI Cold Reboot - Integrated tests #20711 - Unit tests for cold reboot in rebootbackend
gNOI Cold Reboot - Integrated gNOI repository #20712 - Adding gNOI submodule as a sub-dir inside framework
gNOI Cold Reboot - Integrated Docker and Makefile changes #20713 - Enabling framework docker and all Makefile changes
sonic-net/sonic-host-services#181 sonic-host-services changes for cold reboot
gNOI Reboot Frontend (gNMI)
gNOI Warm reboot - rebootbackend changes - Enabling warm reboot in rebootbackend process
gNOI warm reboot tests - Adding component tests for warm reboot
sonic-net/sonic-host-services#191 - sonic-host-services changes for warm reboot

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw changed the title Add a testcase for reboot Add testcases for Reboot Jan 28, 2025
@hdwhdw hdwhdw requested a review from Copilot January 28, 2025 18:37
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

duthost = duthosts[rand_one_dut_hostname]

# Trigger reboot with invalid method
ret, msg = gnoi_request(duthost, localhost, "Reboot", '{"method": 2}')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft requested a review from vvolam January 31, 2025 22:32
pytest_assert(ret == 0, "System.Reboot API reported failure (rc = {}) with message: {}".format(ret, msg))
logging.info("System.Reboot API returned msg: {}".format(msg))

# Get reboot status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get

Could you query telemetry OTHERS/proc/uptime to ensure the device was really rebooted recently?

Kanchana-HCLTech and others added 2 commits February 3, 2025 10:43
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

linux-foundation-easycla bot commented Feb 3, 2025

CLA Missing ID CLA Not Signed

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

4 participants