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

OpTestFastReboot: PTY handling #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

debmc
Copy link
Collaborator

@debmc debmc commented Feb 25, 2019

Tweak the timing of pexpect buffer management and add
some debug logging to help aide problem determination
when pty buffering issues.

Signed-off-by: Deb McLemore [email protected]

@debmc debmc force-pushed the fastreboot-pty branch 3 times, most recently from ebdd7db to 93dca83 Compare February 26, 2019 16:58
@debmc debmc force-pushed the fastreboot-pty branch 2 times, most recently from cced7fa to 36e5e30 Compare March 22, 2019 17:59
@sammj
Copy link
Contributor

sammj commented Mar 26, 2019

@stewart-ibm can you run this against one of your fast-reboot victim machines? :)

self.cv_SYSTEM.goto_state(OpSystemState.OS)
else:
self.cv_SYSTEM.sys_set_bootdev_setup()
Copy link

Choose a reason for hiding this comment

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

Shouldn't these be set by the state machine doing the goto_state() processing?

Or, rather, I guess the question is "What am I missing here?"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

set by the state machine

The cases observed were when a box was left with who-knows-what setting and then when the detection grabbed the box (so we just picked up the shell/OS) and later when we reboot we do not know how the box was setup which can lead to unexpected results.

@ghost
Copy link

ghost commented Apr 12, 2019 via email

@debmc
Copy link
Collaborator Author

debmc commented Apr 13, 2019

state machine

Observed a few failure scenarios when I was testing individual tests and causing failure mid-test (so state machine transitions same-state-to-same-state without power cycles), then I reviewed each testcase module to assure that if the test failed was the state of the system left consistently, i.e. if tests which manipulate the state machine outside the normal flow are the artifacts left behind consistent for the next test fixture is assured of a healthy environment.

For example, if someone manually set the bootdev=setup (so it would stop at Petitboot), but manually booted to the Host OS, then started an op-test testcase the goto would find the Host OS and NOT cycle through a reboot where the bootdev's are properly synchronized with the physical state of the machine. We cannot cover all cases, but when out-of-band manipulation of the state machine takes place its probably good practice to attempt to have things recoverable and not to leave things in a bad way. For independent test execution order, the next test fixture may also want to perform a sendline "reboot" and expect the Host OS to come up, etc.

Tweak the timing of pexpect buffer management and add
some debug logging to help aide problem determination
when pty buffering issues.

Signed-off-by: Deb McLemore <[email protected]>
@PraveenPenguin PraveenPenguin force-pushed the master branch 2 times, most recently from 4d0cb14 to b976629 Compare October 6, 2023 07:38
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.

2 participants