-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Ma Xinjian <[email protected]>
- Loading branch information
Showing
1 changed file
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,19 @@ | |
* Author: Xiao Yang <[email protected]> | ||
*/ | ||
|
||
/* | ||
* Description: | ||
* Check various errnos for preadv2(2). | ||
* 1) preadv2() fails and sets errno to EINVAL if iov_len is invalid. | ||
* 2) preadv2() fails and sets errno to EINVAL if the vector count iovcnt | ||
* is less than zero. | ||
* 3) preadv2() fails and sets errno to EOPNOTSUPP if flag is invalid. | ||
* 4) preadv2() fails and sets errno to EFAULT when attempts to read into | ||
* a invalid address. | ||
* 5) preadv2() fails and sets errno to EBADF if file descriptor is invalid. | ||
* 6) preadv2() fails and sets errno to EBADF if file descriptor is not | ||
* open for reading. | ||
* 7) preadv2() fails and sets errno to EISDIR when fd refers to a directory. | ||
* 8) preadv2() fails and sets errno to ESPIPE if fd is associated with a pipe. | ||
/*\ | ||
* [Description] | ||
* | ||
* Verify that, preadv2(2) fails and sets errno to | ||
* | ||
* 1. EINVAL if iov_len is invalid. | ||
* 2. EINVAL if the vector count iovcnt is less than zero. | ||
* 3. EOPNOTSUPP if flag is invalid. | ||
* 4. EFAULT when attempting to read into an invalid address. | ||
* 5. EBADF if file descriptor is invalid. | ||
* 6. EBADF if file descriptor is not open for reading. | ||
* 7. EISDIR when fd refers to a directory. | ||
* 8. ESPIPE if fd is associated with a pipe. | ||
*/ | ||
|
||
#define _GNU_SOURCE | ||
|