Getting an error midway through a direct write would return an error
and the error-code is returned in the write() call. However, partial
data is over-written during the call.
This tests simulates the ENOSPC error to check for partial direct
write consistency.