In the gtm8787 subtest, the terminal is killed so the error from Tcsetattr() (save_errno = 5/EIO)
is not unexpected. To work around the assert failure, check for a specific white-box case (the newly
introduced WBTEST_KILL_TERMINAL case) and if so skip the assert.
While modifying iott_use.c, noticed a ISSUE_NOPRINCIO_IF_NEEDED_TT usage in case tcgetattr() call on
the terminal fd fails. I don't see the need for this call to issue NOPRINCIO error. It is better for
the NOPRINCIO error to be issued if a write() to the terminal fails (taken care of in iott_write.c
and iott_flush.c). So removed this usage in iott_use.c. In this case, a TCGETATTR error would be issued
and that should be good enough. If ever an attempt is made to display this error message to the terminal
then a NOPRINCIO error would be issued which seems more appropriate to me.
This fixes an occasional v63003/gtm8787 subtest failure due to an assert failure at line 457 below.
In the gtm8787 subtest, the terminal is killed so the error from Tcsetattr() (save_errno = 5/EIO) is not unexpected. To work around the assert failure, check for a specific white-box case (the newly introduced WBTEST_KILL_TERMINAL case) and if so skip the assert.
While modifying iott_use.c, noticed a ISSUE_NOPRINCIO_IF_NEEDED_TT usage in case tcgetattr() call on the terminal fd fails. I don't see the need for this call to issue NOPRINCIO error. It is better for the NOPRINCIO error to be issued if a write() to the terminal fails (taken care of in iott_write.c and iott_flush.c). So removed this usage in iott_use.c. In this case, a TCGETATTR error would be issued and that should be good enough. If ever an attempt is made to display this error message to the terminal then a NOPRINCIO error would be issued which seems more appropriate to me.