-
Notifications
You must be signed in to change notification settings - Fork 18
session: implement forcibly stop #83
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
base: master
Are you sure you want to change the base?
Conversation
c73e750 to
200f221
Compare
metan-ucw
left a comment
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.
Looks good to me, minus the unconditional handling for SIGKILL in the ltp,py. If that is fixed you can add my Reviewed-by: Cyril Hrubis chrubis@suse.cz
a2c6293 to
da185ec
Compare
| if test_data["returncode"] == -signal.SIGKILL and self._stop_cnt > 1: | ||
| self._logger.info("Test killed: %s", test.name) | ||
| return | ||
|
|
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.
Hmm, we are counting the stop_cnt in two places now. Wouldn't it be a bit more elegant if we had property in the SUT that would be true if we are in the process of stopping it? Then we could do if test_data['returncode'] == -signal.SIGKILL and self._sut.in_shutdown: here instead. What do you think?
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.
The force in the SUT is done by default. The gracefully stop is done inside the scheduler, where we wait to complete a test/command before stopping the tests execution.
At the moment, the only reason why we have a stop_cnt in two places is because we want to print a session_killed message inside the Session module. I think I will remove this, and keep only session_stopped
Change the way we complete session by introducing forcibly stop. The way that kirk works after this patch is the following: - if user sends SIGINT or CTRL+C, we simply wait for the running tests to complete and finally stop the session - if user sends SIGINT or CTRL+C again, we stop any execution on the SUT and we terminate the testing suite, flagging the killed test as TSKIP Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com> Closes: linux-test-project#78
Change the way we complete session by introducing forcibly stop. The
way that kirk works after this patch is the following:
if user sends SIGINT or CTRL+C, we simply wait for the running
tests to complete and finally stop the session
if user sends SIGINT or CTRL+C again, we stop any execution on the SUT
and we terminate the testing suite, flagging the killed test as TSKIP
Signed-off-by: Andrea Cervesato andrea.cervesato@suse.com
Closes: #78