a63b28875ff5b7f52b2c41992656afac36c66a34
See https://stackoverflow.com/a/34945814/1655275 > pselect signals that file descriptor is ready and > ioctl(fd, FIONREAD, &len) returns zero len. Failure to detect this condition has been revealed by the testsuite: === RUN TestDisconnectingPortDetection 2017/07/27 13:56:37 PR - Connecting to Probe 2017/07/27 13:56:37 > Searching for port 2341:8037 2017/07/27 13:56:37 Detected port '/dev/ttyACM0' 2341:8037 2017/07/27 13:56:37 Using '/dev/ttyACM0' 2017/07/27 13:56:37 Starting test (timeout 20s) 2017/07/27 13:56:37 PR - Turn ON target 2017/07/27 13:56:37 TR - Connecting to Target 2017/07/27 13:56:37 > Searching for port 2341:8036 2017/07/27 13:56:37 Detected port '/dev/ttyACM0' 2341:8037 [...cut...] 2017/07/27 13:56:46 > Searching for port 2341:8036 2017/07/27 13:56:46 Detected port '/dev/ttyACM0' 2341:8037 2017/07/27 13:56:46 Detected port '/dev/ttyACM1' 2341:8036 2017/07/27 13:56:46 Using '/dev/ttyACM1' 2017/07/27 13:56:46 T2 - Make a Read call 2017/07/27 13:56:46 T1 - Delay 200ms before disconnecting target 2017/07/27 13:56:46 T1 - Disconnect target 2017/07/27 13:56:46 PR - Turn OFF target 2017/07/27 13:56:46 T2 - Read returned: n=0 err=nil --- FAIL: TestDisconnectingPortDetection (9.18s) Error Trace: serial_test.go:100 Error: An error is expected but got nil. %s Messages: Read returned no errors this commit fix the problem above.
go.bug.st/serial
A cross-platform serial library for go-lang.
Documentation and examples
See the godoc here: https://godoc.org/go.bug.st/serial
go.mod transition
This library now support go.mod with the import go.bug.st/serial.
If you came from the pre-go.mod era please update your import paths from go.bug.st/serial.v1 to go.bug.st/serial to receive new updates. Anyway, the latest v1 release should still be avaiable using the old import.
Credits
✨ Thanks to all awesome contributors! ✨
License
The software is release under a BSD 3-clause license
Description
Languages
Go
100%