On 11/01/2012 05:55 PM, Jan Stancek wrote:
> 
> 
> ----- Original Message -----
>> From: "Wanlong Gao" <[email protected]>
>> To: "Jan Stancek" <[email protected]>
>> Cc: "sanil kumar" <[email protected]>, "Mike Frysinger" 
>> <[email protected]>, "shyju pv" <[email protected]>,
>> "max maxiansheng" <[email protected]>, "LTP" 
>> <[email protected]>
>> Sent: Thursday, 1 November, 2012 9:15:08 AM
>> Subject: Re: [LTP] [PATCH] ioctl01: change the errno to ENOTTY when passed 
>> an        invalid command
>>
>>>> diff --git a/testcases/kernel/syscalls/ioctl/ioctl01.c
>>>> b/testcases/kernel/syscalls/ioctl/ioctl01.c
>>>> index 8b044e7..ef64896 100644
>>>> --- a/testcases/kernel/syscalls/ioctl/ioctl01.c
>>>> +++ b/testcases/kernel/syscalls/ioctl/ioctl01.c
>>>> @@ -87,7 +87,7 @@ struct test_case_t {
>>>>    &fd, TCGETA, (struct termio *)-1, EFAULT},
>>>>        /* command is invalid */
>>>>    {
>>>> -  &fd, INVAL_IOCTL, &termio, EINVAL},
>>>> +  &fd, INVAL_IOCTL, &termio, ENOTTY},
>>>
>>> Won't this break on older kernels? Can we test for kernel version
>>> with tst_kvercmp()?
>>
>> Surely will, this is also a trouble on my side.
>> Does we treat this as a kernel bug or a kernel change?
>> I think if we treat it as a kernel bug, we needn't check the kernel
>> version, while if
>> it just a kernel change, we need.
>> And, What's your opinion about this?
> 
> I'd go with kernel change, it worked the old way for years, there may be
> applications which rely on that. If we just change it to 'ENOTTY' it will
> start failing on older kernels and there are 2 choices: fix the kernel
> or stop using this testcase. And I'm not sure there are enough arguments
> to justify changing it in various distro's (stable) kernels.

OK, agree.

> 
> Is this commit backported to any upstream stable trees? Are there plans to do 
> so?

I didn't see any backport, it may because some drivers return the old value, we 
can't
ensure to backport all of them, so I think there is no backprot plan. it's 
needless.

Thanks,
Wanlong Gao

> 
> Regards,
> Jan
> 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to