add option to print serial stats on start#57
add option to print serial stats on start#57AndrewCramp wants to merge 1 commit intocbrake:masterfrom
Conversation
Allows for users to print the serial stats both before and after a test so the difference can be determined. Signed-off-by: Andrew Cramp <acr@xiphos.com>
|
|
||
| set_modem_lines(_fd, _cl_loopback ? TIOCM_LOOP : 0, TIOCM_LOOP); | ||
|
|
||
| if(_cl_stats_start) |
There was a problem hiding this comment.
Style issue (missing space).
| -Z, --error-on-timeout Treat timeouts as errors | ||
| -n, --no-icount Do not request driver for counts of input serial line interrupts (TIOCGICOUNT) | ||
| -f, --flush-buffers Flush RX and TX buffers before starting | ||
| -g, --stats-start Print TIOCGICOUNT stats on script startup before sending or receiveing data |
There was a problem hiding this comment.
Haven't checked the code, but why -g? And do we actually need a short option for this? Seems to me like a debugging feature.
There was a problem hiding this comment.
I did not have a specific reason for -g other than it being available. I considered the following which made more sense, but were unavailable -s, -S, -t, -T.
I am okay with it being only available as a long option. My main purpose for this is to be able to determine the difference in error counts during a test run, as currently it is a running total at then end and it is not clear if the counters were incremented during the test case, or a previous one.
There was a problem hiding this comment.
I think we should go in the similar way to --stats (AFAIU it exists only as long option).
| " -Z, --error-on-timeout Treat timeouts as errors\n" | ||
| " -n, --no-icount Do not request driver for counts of input serial line interrupts (TIOCGICOUNT)\n" | ||
| " -f, --flush-buffers Flush RX and TX buffers before starting\n" | ||
| " -g, --stats-start Print TIOCGICOUNT stats on script startup before sending or receiveing data\n" |
There was a problem hiding this comment.
Wonder if there is a better place so we can group options that are semantically bound to each other.
There was a problem hiding this comment.
Yes, this makes sense it could be moved below or above the --stats option.
Allows for users to print the serial stats both before and after a test so the difference can be determined.