On 03/15/2012 05:15 PM, Jan Stancek wrote:
> 
> Testcase 1.3 - EINVAL: uninitialized iocb
> is about submitting uninitialized iocb structure.
> 
> Test is expecting to get -EINVAL, but other values are also
> possible as uninitialized struct can contain any values.
> 
> For example following data fails with -EBADF:
> --- snip ---
> unsigned char bad_iocb[64] = {
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
>      0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> memcpy(&iocb, bad_iocb, sizeof(iocb));
> iocbs[0] = &iocb;
> TEST(io_submit(ctx, 1, iocbs));
> check_result(-EINVAL, TEST_RETURN);
> --- snip ---
> 
> This patch accepts also few other errno codes as valid return value.
> 
> Signed-off-by: Jan Stancek <[email protected]>

Reviewed-by: Caspar Zhang <[email protected]>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to