Github user juliuszsompolski commented on the issue:
https://github.com/apache/spark/pull/20555
@jiangxb1987 there is ReadAheadInputStreamSuite that extends
GenericFileInputStreamSuite.
I updated it and added more combination testing with different buffer sizes
that should exercise more interactions between the wrapped and outer buffers.