From: Caspar Z. <cz...@re...> - 2011-03-27 14:05:00
|
Sorry, there are some trailing whitespace in the patch, please ignore this one, I'll workout a newer version. On 03/27/2011 09:41 PM, cz...@re... wrote: > > io_submit01 contains 4 negative testing: EINVAL, EFAULT, EINVAL+EFAULT > and EBADF. The first 3 testcases didn't initialize the content of 'ctx' > so that they contained invalid argument in the cases. This may cause > incorrect result on some architectures, like: > > io_submit01 1 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 2 TFAIL : unexpected returned value - -22 - expected > -14 > io_submit01 3 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 4 TPASS : expected failure - returned value = 9 : Bad > file descriptor > > I fixed this issue by moving the initialization of ctx before the cases, > also added some additional negative + positive cases. Now tested on x86 > and s390x system, the results seem good: > > io_submit01 1 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 2 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 3 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 4 TPASS : expected failure - returned value = 14 : Bad > address > io_submit01 5 TPASS : expected failure - returned value = 22 : > Invalid argument > io_submit01 6 TPASS : expected failure - returned value = 9 : Bad > file descriptor > io_submit01 7 TPASS : call succeeded expectedly > io_submit01 8 TPASS : call succeeded expectedly > > Signed-off-by: Caspar Zhang <cz...@re...> > --- > testcases/kernel/syscalls/io_submit/io_submit01.c | 143 ++++++++++++++------- > 1 files changed, 98 insertions(+), 45 deletions(-) > -- /---------------------------------------\ | Name: Caspar Zhang | | Team: Kernel-QE | | Timezone: GMT+0800 (Asia/Shanghai) | | IRC: caspar @ #kernel-qe, #eng-china | | Phone: +86-10-6260-8150 | | Cellphone: +86-138-1073-0090 | \---------------------------------------/ |