All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: shyju pv <shyju.pv@huawei.com>,
	sanil kumar <sanil.kumar@huawei.com>,
	max maxiansheng <max.maxiansheng@huawei.com>,
	Mike Frysinger <vapier@gentoo.org>,
	LTP <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] ioctl01: change the errno to ENOTTY when passed an	invalid command
Date: Thu, 01 Nov 2012 18:05:13 +0800	[thread overview]
Message-ID: <50924959.10905@cn.fujitsu.com> (raw)
In-Reply-To: <1211223113.3263014.1351763732593.JavaMail.root@redhat.com>

On 11/01/2012 05:55 PM, Jan Stancek wrote:
> 
> 
> ----- Original Message -----
>> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: "sanil kumar" <sanil.kumar@huawei.com>, "Mike Frysinger" <vapier@gentoo.org>, "shyju pv" <shyju.pv@huawei.com>,
>> "max maxiansheng" <max.maxiansheng@huawei.com>, "LTP" <ltp-list@lists.sourceforge.net>
>> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2012-11-01 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1351742419-30299-1-git-send-email-gaowanlong@cn.fujitsu.com>
2012-11-01  8:05 ` [LTP] [PATCH] ioctl01: change the errno to ENOTTY when passed an invalid command Jan Stancek
2012-11-01  8:15   ` Wanlong Gao
2012-11-01  9:55     ` Jan Stancek
2012-11-01 10:05       ` Wanlong Gao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50924959.10905@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=max.maxiansheng@huawei.com \
    --cc=sanil.kumar@huawei.com \
    --cc=shyju.pv@huawei.com \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.