Skip to content

Fix the term test for chassisd to make sure the daemon actually restarted#7150

Merged
judyjoseph merged 1 commit intosonic-net:masterfrom
judyjoseph:chassisd_fix
Jan 17, 2023
Merged

Fix the term test for chassisd to make sure the daemon actually restarted#7150
judyjoseph merged 1 commit intosonic-net:masterfrom
judyjoseph:chassisd_fix

Conversation

@judyjoseph
Copy link
Contributor

Description of PR

Fix the term test for chassisd to make sure the daemon actually restarted

Summary:
Along with the code PR : sonic-net/sonic-platform-daemons#328

Approach

What is the motivation for this PR?

How did you do it?

Added a new wait_for logic to make sure the daemon is restarted and pid is greater than the earlier one.

How did you verify/test it?

platform_tests/daemon/test_chassisd.py::test_pmon_chassisd_term_and_start_status[str2-7250-sup-1] PASSED

Any platform specific information?

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

Documentation

@judyjoseph judyjoseph merged commit 3156593 into sonic-net:master Jan 17, 2023
@judyjoseph judyjoseph deleted the chassisd_fix branch February 14, 2023 07:38
yejianquan pushed a commit that referenced this pull request Jul 7, 2023
…#8776)

Fix for PID assertion issue - PSUD and CHASSID platform cases
Fixing up other chassisd and psud tests to poll for deamon to restart with bigger pid than before
---------
Cherry-Pick PR #7781 : For resolving conflicts.
Fix for PID assertion issue - PSUD and CHASSID platform cases.

Description of PR
Fixing up other chassisd and psud platform tests to poll for deamon to restart with bigger pid than before.
This is an extension of PR #7150.

Summary:
Fixes # (issue)

Fixes PSUD 'stop & start', 'term & start' and 'kill & start' test cases by making sure the daemon restarted has bigger PID than before.
Fixes CHASSID 'stop & start' and 'kill & start' test cases by making sure the daemon restarted has bigger PID than before.

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 Test case(new/improvement)
Back port request
 201911
 202012
 202205
Approach
What is the motivation for this PR?
Currently PSUD and CHASSID platform test cases like 'term & start', 'kill & start' and 'stop & start' don't check if the restarted daemon has bigger pid than the previous one or not.
Currently "check_expected_daemon_status" doesn't verify about pre-daemon-pid, just returns TRUE even if the status is RUNNING with old PID.
How did you do it?
By invoking 'check_if_daemon_restarted' method on the above-mentioned cases and making sure the new pid is bigger than the old pid.
How did you verify/test it?
Ran the respective platform tests against a multi-asic line card in a T2 chassis.

Co-authored-by: sanmalho <[email protected]>, [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants