Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/dragonfly/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ def stop(self, kill=False):
else:
proc.terminate()
proc.communicate(timeout=15)
# if the return code is 0 it means normal termination
# if the return code is negative it means termination by signal
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure this is the behavior, as when I tested it when dragonfly crashed the returncode was < 0 when it did not crash the returncode was 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I know I saw the documentation, but you know there is documentation and there is code.. just make sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm my two cents here are that if the process processes the signal it would return 0 otherwise a negative number with the signal that terminated it. But from my understanding even if returns <0 it doesn't always imply the process crashed.

I will revert it to the original <0 and when something related crashes we can take a look.

# if the return code is positive it means abnormal exit
if proc.returncode != 0:
raise Exception("Dragfonfly did not terminate gracefully")

except subprocess.TimeoutExpired:
# We need to send SIGUSR1 to DF such that it prints the stacktrace
Expand Down