generic: Test RWF_NOWAIT
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Thu, 7 Dec 2017 16:00:43 +0000 (10:00 -0600)
committerEryu Guan <eguan@redhat.com>
Thu, 14 Dec 2017 04:39:57 +0000 (12:39 +0800)
commit6a2fd57fb82167d33d5d51a783468fd6e5a06186
tree2d4d8b145b80e1e6ed82d7a3937e50a93fb24e4d
parenteef2209b4fdbff96b57b819ab7a808373680c914
generic: Test RWF_NOWAIT

Tests the RWF_NOWAIT flag so the I/O returns immediately with
-EAGAIN on a new file since it requires block allocation.

It creates a file, syncs it, and overwrites the file with
RWF_NOWAIT.  This should succeed.

Finally, read the contents to make sure the overwrite is successful.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/471 [new file with mode: 0755]
tests/generic/471.out [new file with mode: 0644]
tests/generic/group