-
Notifications
You must be signed in to change notification settings - Fork 218
Temporarily disable trap in diff_model as logFileRotate or testLogFileRotate may return non-zero code. #2629
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
Conversation
…FileRotate may return non-zero code.
@@ -1354,7 +1360,7 @@ function wdtRotateAndCopyLogFile() { | |||
testLogFileRotate "${WDT_OUTPUT_DIR}/${logFileName}" |
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.
Should this be removed since logFileRotate already called it?
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.
Removed.
I delegate to @jshum2479 - who approved yesterday but hasn't seen today's diff. Minor comment: stop/start in the rotate function itself looks unhelpful since all of the callers will have already stopped, it implicitly starts a trap that's about to be started by all of the callers, and if a caller actually deliberately had no trap it'd confusingly start one... |
Currently the rotate function is only called in the modelInImage.sh script which has trap enabled. I have removed the stop/start in wdtRotateAndCopyLogFile function. |
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.
Welp since Johny is happy I'm happy :)
The wdt shell script or logFileRotate may return non-zero code and it will go to trap if the trap is on. This change temporarily disables the trap and then restores it in the end.