public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
@ 2012-03-14 11:44 Jan Stancek
  2012-03-14 12:50 ` Wanlong Gao
  2012-03-14 13:08 ` Caspar Zhang
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Stancek @ 2012-03-14 11:44 UTC (permalink / raw)
  To: ltp-list; +Cc: Jeffrey Burke

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]


This kernel commit restored original behavior:
commit 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8
Author: Andy Whitcroft <apw@canonical.com>
Date:   Wed Nov 2 09:44:39 2011 +0100
     readlinkat: ensure we return ENOENT for the empty pathname for
normal lookups

For kernel >= 3.2, ENOENT should be expected errno code.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
  testcases/kernel/syscalls/readlink/readlink03.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)



[-- Attachment #2: 0001-readlink03-fix-expected-errno-for-kernel-3.2.patch --]
[-- Type: text/x-patch, Size: 532 bytes --]

diff --git a/testcases/kernel/syscalls/readlink/readlink03.c b/testcases/kernel/syscalls/readlink/readlink03.c
index 370bf7d..85141f9 100644
--- a/testcases/kernel/syscalls/readlink/readlink03.c
+++ b/testcases/kernel/syscalls/readlink/readlink03.c
@@ -174,7 +174,8 @@ int main(int ac, char **av)
 			}
 
 			if (strncmp(test_desc, "Symlink Pathname is empty", 25) == 0) {
-				if ((tst_kvercmp(2, 6, 39)) >= 0)
+				if (tst_kvercmp(2, 6, 39) >= 0
+					&& tst_kvercmp(3, 2, 0) < 0)
 					Test_cases[i].exp_errno = EINVAL;
 			}
 


[-- Attachment #3: Type: text/plain, Size: 317 bytes --]

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
  2012-03-14 11:44 [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2 Jan Stancek
@ 2012-03-14 12:50 ` Wanlong Gao
  2012-03-14 13:57   ` Jan Stancek
  2012-03-14 13:08 ` Caspar Zhang
  1 sibling, 1 reply; 5+ messages in thread
From: Wanlong Gao @ 2012-03-14 12:50 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

Hi Jan,

> 
> This kernel commit restored original behavior:
> commit 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8
> Author: Andy Whitcroft <apw@canonical.com>
> Date:   Wed Nov 2 09:44:39 2011 +0100
>     readlinkat: ensure we return ENOENT for the empty pathname for
> normal lookups
> 
> For kernel >= 3.2, ENOENT should be expected errno code.


I had posted a patch long time ago, you can see here
http://marc.info/?l=ltp-list&m=132063831228321&w=2

This is a kernel bug, and already fixed in 3.0 and 3.1
stable tree, so, just test the kernel version like this
is not the best method.

What do you think?

Thanks,
Wanlong Gao

> 

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  testcases/kernel/syscalls/readlink/readlink03.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing 
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> 
> 
> 
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
  2012-03-14 11:44 [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2 Jan Stancek
  2012-03-14 12:50 ` Wanlong Gao
@ 2012-03-14 13:08 ` Caspar Zhang
  1 sibling, 0 replies; 5+ messages in thread
From: Caspar Zhang @ 2012-03-14 13:08 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

On 03/14/2012 07:44 PM, Jan Stancek wrote:
> 
> This kernel commit restored original behavior:
> commit 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8
> Author: Andy Whitcroft <apw@canonical.com>
> Date:   Wed Nov 2 09:44:39 2011 +0100
>      readlinkat: ensure we return ENOENT for the empty pathname for
> normal lookups
> 
> For kernel >= 3.2, ENOENT should be expected errno code.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>

looks good to me.

Reviewed-by: Caspar Zhang <caspar@casparzhang.com>

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
  2012-03-14 12:50 ` Wanlong Gao
@ 2012-03-14 13:57   ` Jan Stancek
  2012-03-14 14:04     ` Wanlong Gao
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2012-03-14 13:57 UTC (permalink / raw)
  To: gaowanlong; +Cc: ltp-list, Jeffrey Burke



----- Original Message -----
> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp-list@lists.sourceforge.net, "Jeffrey Burke" <jburke@redhat.com>
> Sent: Wednesday, March 14, 2012 1:50:56 PM
> Subject: Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
> 
> Hi Jan,
> 
> > 
> > This kernel commit restored original behavior:
> > commit 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8
> > Author: Andy Whitcroft <apw@canonical.com>
> > Date:   Wed Nov 2 09:44:39 2011 +0100
> >     readlinkat: ensure we return ENOENT for the empty pathname for
> > normal lookups
> > 
> > For kernel >= 3.2, ENOENT should be expected errno code.
> 
> 
> I had posted a patch long time ago, you can see here
> http://marc.info/?l=ltp-list&m=132063831228321&w=2
> 
> This is a kernel bug, and already fixed in 3.0 and 3.1
> stable tree, so, just test the kernel version like this
> is not the best method.
> 
> What do you think?

Agreed, version check doesn't make much sense.

I think if this patch was important enough to be backported to stable
trees, we can be sure it's a bug and we can drop that version
check entirely - which is what your patch does.

Regards,
Jan


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
  2012-03-14 13:57   ` Jan Stancek
@ 2012-03-14 14:04     ` Wanlong Gao
  0 siblings, 0 replies; 5+ messages in thread
From: Wanlong Gao @ 2012-03-14 14:04 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

On 03/14/2012 09:57 PM, Jan Stancek wrote:

> 
> 
> ----- Original Message -----
>> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: ltp-list@lists.sourceforge.net, "Jeffrey Burke" <jburke@redhat.com>
>> Sent: Wednesday, March 14, 2012 1:50:56 PM
>> Subject: Re: [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2
>>
>> Hi Jan,
>>
>>>
>>> This kernel commit restored original behavior:
>>> commit 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8
>>> Author: Andy Whitcroft <apw@canonical.com>
>>> Date:   Wed Nov 2 09:44:39 2011 +0100
>>>     readlinkat: ensure we return ENOENT for the empty pathname for
>>> normal lookups
>>>
>>> For kernel >= 3.2, ENOENT should be expected errno code.
>>
>>
>> I had posted a patch long time ago, you can see here
>> http://marc.info/?l=ltp-list&m=132063831228321&w=2
>>
>> This is a kernel bug, and already fixed in 3.0 and 3.1
>> stable tree, so, just test the kernel version like this
>> is not the best method.
>>
>> What do you think?
> 
> Agreed, version check doesn't make much sense.
> 
> I think if this patch was important enough to be backported to stable
> trees, we can be sure it's a bug and we can drop that version
> check entirely - which is what your patch does.


Yeah, so let me resend it with your Ack.

Thanks,
Wanlong Gao

> 
> Regards,
> Jan
> 
> 



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-14 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 11:44 [LTP] [PATCH] readlink03: fix expected errno for kernel >=3.2 Jan Stancek
2012-03-14 12:50 ` Wanlong Gao
2012-03-14 13:57   ` Jan Stancek
2012-03-14 14:04     ` Wanlong Gao
2012-03-14 13:08 ` Caspar Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox