|
4 | 4 | * Author: Xiao Yang <[email protected]> |
5 | 5 | */ |
6 | 6 |
|
7 | | -/* |
8 | | -* Test Name: preadv02 |
9 | | -* |
10 | | -* Description: |
11 | | -* 1) preadv(2) fails if iov_len is invalid. |
12 | | -* 2) preadv(2) fails if the vector count iovcnt is less than zero. |
13 | | -* 3) preadv(2) fails if offset is negative. |
14 | | -* 4) preadv(2) fails when attempts to read into a invalid address. |
15 | | -* 5) preadv(2) fails if file descriptor is invalid. |
16 | | -* 6) preadv(2) fails if file descriptor is not open for reading. |
17 | | -* 7) preadv(2) fails when fd refers to a directory. |
18 | | -* 8) preadv(2) fails if fd is associated with a pipe. |
19 | | -* |
20 | | -* Expected Result: |
21 | | -* 1) preadv(2) should return -1 and set errno to EINVAL. |
22 | | -* 2) preadv(2) should return -1 and set errno to EINVAL. |
23 | | -* 3) preadv(2) should return -1 and set errno to EINVAL. |
24 | | -* 4) preadv(2) should return -1 and set errno to EFAULT. |
25 | | -* 5) preadv(2) should return -1 and set errno to EBADF. |
26 | | -* 6) preadv(2) should return -1 and set errno to EBADF. |
27 | | -* 7) preadv(2) should return -1 and set errno to EISDIR. |
28 | | -* 8) preadv(2) should return -1 and set errno to ESPIPE. |
29 | | -*/ |
| 7 | +/*\ |
| 8 | + * [Description] |
| 9 | + * |
| 10 | + * - EINVAL when iov_len is invalid. |
| 11 | + * - EINVAL when the vector count iovcnt is less than zero. |
| 12 | + * - EINVAL when offset is negative. |
| 13 | + * - EFAULT when attempts to read into a invalid address. |
| 14 | + * - EBADF when file descriptor is invalid. |
| 15 | + * - EBADF when file descriptor is not open for reading. |
| 16 | + * - EISDIR when fd refers to a directory. |
| 17 | + * - ESPIPE when fd is associated with a pipe. |
| 18 | + */ |
30 | 19 |
|
31 | 20 | #define _GNU_SOURCE |
32 | 21 |
|
|
0 commit comments