Backport of r67908:
Added test case to ensure attempts to read from a file opened for writing
fail.
2 files changed