preadv/preadv02.c: add new testcase
PATCH 1/1 preadv/preadv02.c: add new testcase
1) preadv(2) fails if iov_len is invalid and set errno to EINVAL.
2) preadv(2) fails if the vector count is less than zero and set errno to EINVAL.
3) preadv(2) fails if offset is negative and set errno to EINVAL.
--- runtest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 2 + testcases/kernel/syscalls/.gitignore | 2 + testcases/kernel/syscalls/preadv/preadv02.c | 126 ++++++++++++++++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 testcases/kernel/syscalls/preadv/preadv02.c
runtest/ltplite +1 -0
@@ -589,6 +589,7 @@ pread02 pread02 pread03 pread03 preadv01 preadv01 +preadv02 preadv02 profil01 profil01
runtest/stress.part3 +1 -0
@@ -499,6 +499,7 @@ pread02 pread02 pread03 pread03 preadv01 preadv01 +preadv02 preadv02 profil01 profil01
runtest/syscalls +2 -0
@@ -781,6 +781,8 @@ pread03_64 pread03_64 preadv01 preadv01 preadv01_64 preadv01_64 +preadv02 preadv02 +preadv02_64 preadv02_64 profil01 profil01
testcases/kernel/syscalls/.gitignore +2 -0
@@ -659,6 +659,8 @@ /pread/pread03_64 /preadv/preadv01 /preadv/preadv01_64 +/preadv/preadv02 +/preadv/preadv02_64 /profil/profil01 /pselect/pselect01 /pselect/pselect01_64
testcases/kernel/syscalls/preadv/preadv02.c new file +126 -0
126 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 1/1 pwritev/pwritev02.c: add new testcase
1) pwritev(2) fails if iov_len is invalid and set errno to EINVAL.
2) pwritev(2) fails if the vector count is less than zero set errno to EINVAL.
3) pwritev(2) fails if offset is negative and set errno to EINVAL.
--- runtest/ltplite | 1 + runtest/stress.part3 | 1 + runtest/syscalls | 2 + testcases/kernel/syscalls/.gitignore | 2 + testcases/kernel/syscalls/pwritev/pwritev02.c | 126 ++++++++++++++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 testcases/kernel/syscalls/pwritev/pwritev02.c
runtest/ltplite +1 -0
@@ -609,6 +609,7 @@ pwrite02_64 pwrite02_64 pwrite04_64 pwrite04_64 pwritev01 pwritev01 +pwritev02 pwritev02 read01 read01 read02 read02
runtest/stress.part3 +1 -0
@@ -518,6 +518,7 @@ pwrite02_64 pwrite02_64 pwrite04_64 pwrite04_64 pwritev01 pwritev01 +pwritev02 pwritev02 read01 read01 read02 read02
runtest/syscalls +2 -0
@@ -815,6 +815,8 @@ pwrite04_64 pwrite04_64 pwritev01 pwritev01 pwritev01_64 pwritev01_64 +pwritev02 pwritev02 +pwritev02_64 pwritev02_64 quotactl01 quotactl01 quotactl02 quotactl02
testcases/kernel/syscalls/.gitignore +2 -0
@@ -680,6 +680,8 @@ /pwrite/pwrite04_64 /pwritev/pwritev01 /pwritev/pwritev01_64 +/pwritev/pwritev02 +/pwritev/pwritev02_64 /quotactl/quotactl01 /quotactl/quotactl02 /read/read01
testcases/kernel/syscalls/pwritev/pwritev02.c new file +126 -0
126 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 1/1 pwritev/pwritev02.c: add new testcase
Hi!
Both pushed, thanks.
BTW: both preadv() and pwritev() can also fail with errors specified for
read() and write(), so we should, get EBADFD if fd is invalid or not open for reading/writing for read/write, etc.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 pwritev/pwritev02.c: add new testcase
? 2016/01/27 0:38, Cyril Hrubis ??:
Quoted 6 lines
Hi!
Both pushed, thanks.BTW: both
preadv()andpwritev()can also fail with errors specified for
read()andwrite(), so we should, get EBADFD if fd is invalid or not open for reading/writing for read/write, etc.
Thanks for your suggestion. I will send patches to test other errors.