public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] Fix wrong pattern used by fnmatch in test case proc01.c
@ 2015-11-27  6:44 Li Jin
  2015-11-27  6:44 ` [LTP] [PATCH] " Li Jin
  0 siblings, 1 reply; 11+ messages in thread
From: Li Jin @ 2015-11-27  6:44 UTC (permalink / raw)
  To: ltp


Hi

Hi,

When I run test case proc01 with 4.1 linux kernel, found that fnmatch use a
wrong pattern to match the known issue under /proc/sys/net/ipv6/conf/ such as
/proc/sys/net/ipv6/conf/all/stable_secret, and have the following error:

[root@localhost tmp]# ./proc01 
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      1  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/all/stable_secret: errno=EIO(5): Input/output error
proc01      2  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/bond0/stable_secret: errno=EIO(5): Input/output error
proc01      3  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/default/stable_secret: errno=EIO(5): Input/output error
proc01      4  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/eth0/stable_secret: errno=EIO(5): Input/output error

Test passed with the following change

/proc/sys/net/ipv6/conf/*/stable_secret --> /proc/sys/net/ipv6/conf/[a-z]*/stable_secret

[root@localhost ~]# ./proc01 
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/all/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/bond0/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/default/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/eth0/stable_secret: known issue: errno=EIO(5): Input/output error

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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-11-27  6:44 [LTP] Fix wrong pattern used by fnmatch in test case proc01.c Li Jin
@ 2015-11-27  6:44 ` Li Jin
  2015-11-30 12:46   ` Jan Stancek
  0 siblings, 1 reply; 11+ messages in thread
From: Li Jin @ 2015-11-27  6:44 UTC (permalink / raw)
  To: ltp

fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
to replace /ipv6/conf/*/stable_secret to check the known issue string such as
/proc/sys/net/ipv6/conf/all/stable_secret

Signed-off-by: Li Jin <King.lijin@huawei.com>
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/fs/proc/proc01.c b/testcases/kernel/fs/proc/proc01.c
index 2825b51..197eb55 100644
--- a/testcases/kernel/fs/proc/proc01.c
+++ b/testcases/kernel/fs/proc/proc01.c
@@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
 	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
 	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
 	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
-	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
+	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},
 	{"", "", 0}
 };
 
-- 
1.8.3.1


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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-11-27  6:44 ` [LTP] [PATCH] " Li Jin
@ 2015-11-30 12:46   ` Jan Stancek
  2015-12-01  1:30     ` Lijin
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Stancek @ 2015-11-30 12:46 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Li Jin" <King.lijin@huawei.com>
> To: "king lijin" <king.lijin@huawei.com>, ltp@lists.linux.it
> Cc: "Li Jin" <King.lijin@huawei.com>
> Sent: Friday, 27 November, 2015 7:44:09 AM
> Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case	proc01.c
> 
> fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
> to replace /ipv6/conf/*/stable_secret to check the known issue string such as
> /proc/sys/net/ipv6/conf/all/stable_secret

Hi,

An explanation _why_ it is wrong would be helpful too.

> 
> Signed-off-by: Li Jin <King.lijin@huawei.com>
> ---
>  testcases/kernel/fs/proc/proc01.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/fs/proc/proc01.c
> b/testcases/kernel/fs/proc/proc01.c
> index 2825b51..197eb55 100644
> --- a/testcases/kernel/fs/proc/proc01.c
> +++ b/testcases/kernel/fs/proc/proc01.c
> @@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
>  	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
>  	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
>  	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
> -	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
> +	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},

This has problems as well:

# ip tuntap add 1tap mode tap
# ./proc01 -m 128
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      1  TFAIL  :  proc01.c:393: read failed: /proc/sys/net/ipv6/conf/1tap/stable_secret: errno=EIO(5): Input/output error
...

How about:
+       {"read", "/proc/sys/net/ipv6/conf/?*/stable_secret", EIO},

Regards,
Jan

>  	{"", "", 0}
>  };
>  
> --
> 1.8.3.1
> 
> 
> --
> Mailing list info: http://lists.linux.it/listinfo/ltp
> 

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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-11-30 12:46   ` Jan Stancek
@ 2015-12-01  1:30     ` Lijin
  2015-12-01  8:35       ` Jan Stancek
  0 siblings, 1 reply; 11+ messages in thread
From: Lijin @ 2015-12-01  1:30 UTC (permalink / raw)
  To: ltp

On 2015/11/30 20:46, Jan Stancek wrote:
> 
> 
> 
> 
> ----- Original Message -----
>> From: "Li Jin" <King.lijin@huawei.com>
>> To: "king lijin" <king.lijin@huawei.com>, ltp@lists.linux.it
>> Cc: "Li Jin" <King.lijin@huawei.com>
>> Sent: Friday, 27 November, 2015 7:44:09 AM
>> Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case	proc01.c
>>
>> fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
>> to replace /ipv6/conf/*/stable_secret to check the known issue string such as
>> /proc/sys/net/ipv6/conf/all/stable_secret
> 
> Hi,
> 
> An explanation _why_ it is wrong would be helpful too.

Got it. The reason is that a single "*" can not be used to match the any string in fnmatch.
> 
>>
>> Signed-off-by: Li Jin <King.lijin@huawei.com>
>> ---
>>  testcases/kernel/fs/proc/proc01.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/testcases/kernel/fs/proc/proc01.c
>> b/testcases/kernel/fs/proc/proc01.c
>> index 2825b51..197eb55 100644
>> --- a/testcases/kernel/fs/proc/proc01.c
>> +++ b/testcases/kernel/fs/proc/proc01.c
>> @@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
>>  	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
>>  	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
>>  	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
>> -	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
>> +	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},
> 
> This has problems as well:

Just ignore it. It's the problem of my linux system

> 
> # ip tuntap add 1tap mode tap
> # ./proc01 -m 128
> proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
> proc01      1  TFAIL  :  proc01.c:393: read failed: /proc/sys/net/ipv6/conf/1tap/stable_secret: errno=EIO(5): Input/output error
> ...
> 
> How about:
> +       {"read", "/proc/sys/net/ipv6/conf/?*/stable_secret", EIO},

Good idea. It works and I will send V2 patch.

Regards,

Jin

> 
> Regards,
> Jan
> 
>>  	{"", "", 0}
>>  };
>>  
>> --
>> 1.8.3.1
>>
>>
>> --
>> Mailing list info: http://lists.linux.it/listinfo/ltp
>>
> 
> .
> 



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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01  1:30     ` Lijin
@ 2015-12-01  8:35       ` Jan Stancek
  2015-12-01  9:34         ` Lijin
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Stancek @ 2015-12-01  8:35 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Lijin(Euler Dept 8)" <lijin14@huawei.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: "Li Jin" <King.lijin@huawei.com>, ltp@lists.linux.it
> Sent: Tuesday, 1 December, 2015 2:30:27 AM
> Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
> 
> On 2015/11/30 20:46, Jan Stancek wrote:
> > 
> > 
> > 
> > 
> > ----- Original Message -----
> >> From: "Li Jin" <King.lijin@huawei.com>
> >> To: "king lijin" <king.lijin@huawei.com>, ltp@lists.linux.it
> >> Cc: "Li Jin" <King.lijin@huawei.com>
> >> Sent: Friday, 27 November, 2015 7:44:09 AM
> >> Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case
> >> 	proc01.c
> >>
> >> fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
> >> to replace /ipv6/conf/*/stable_secret to check the known issue string such
> >> as
> >> /proc/sys/net/ipv6/conf/all/stable_secret
> > 
> > Hi,
> > 
> > An explanation _why_ it is wrong would be helpful too.
> 
> Got it. The reason is that a single "*" can not be used to match the any
> string in fnmatch.

Why not? According to [1] referenced by [2]:
  The <asterisk> ( '*' ) is a pattern that shall match any string, including the null string
and it looks like valid 'shell wildcard pattern' (fnmatch(3)).

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html

> > 
> >>
> >> Signed-off-by: Li Jin <King.lijin@huawei.com>
> >> ---
> >>  testcases/kernel/fs/proc/proc01.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/testcases/kernel/fs/proc/proc01.c
> >> b/testcases/kernel/fs/proc/proc01.c
> >> index 2825b51..197eb55 100644
> >> --- a/testcases/kernel/fs/proc/proc01.c
> >> +++ b/testcases/kernel/fs/proc/proc01.c
> >> @@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
> >>  	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
> >>  	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
> >>  	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
> >> -	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
> >> +	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},
> > 
> > This has problems as well:
> 
> Just ignore it. It's the problem of my linux system
> 
> > 
> > # ip tuntap add 1tap mode tap
> > # ./proc01 -m 128
> > proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
> > proc01      1  TFAIL  :  proc01.c:393: read failed:
> > /proc/sys/net/ipv6/conf/1tap/stable_secret: errno=EIO(5): Input/output
> > error
> > ...
> > 
> > How about:
> > +       {"read", "/proc/sys/net/ipv6/conf/?*/stable_secret", EIO},
> 
> Good idea. It works and I will send V2 patch.

I'm curious on what distro and glibc version original code is failing for you.

Regards,
Jan

> 
> Regards,
> 
> Jin
> 
> > 
> > Regards,
> > Jan
> > 
> >>  	{"", "", 0}
> >>  };
> >>  
> >> --
> >> 1.8.3.1
> >>
> >>
> >> --
> >> Mailing list info: http://lists.linux.it/listinfo/ltp
> >>
> > 
> > .
> > 
> 
> 
> 

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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01  8:35       ` Jan Stancek
@ 2015-12-01  9:34         ` Lijin
  2015-12-01 10:02           ` Jan Stancek
  2015-12-01 17:10           ` Jeffrey Bastian
  0 siblings, 2 replies; 11+ messages in thread
From: Lijin @ 2015-12-01  9:34 UTC (permalink / raw)
  To: ltp

On 2015/12/1 16:35, Jan Stancek wrote:
> 
> 
> 
> 
> ----- Original Message -----
>> From: "Lijin(Euler Dept 8)" <lijin14@huawei.com>
>> To: "Jan Stancek" <jstancek@redhat.com>
>> Cc: "Li Jin" <King.lijin@huawei.com>, ltp@lists.linux.it
>> Sent: Tuesday, 1 December, 2015 2:30:27 AM
>> Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
>>
>> On 2015/11/30 20:46, Jan Stancek wrote:
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>>> From: "Li Jin" <King.lijin@huawei.com>
>>>> To: "king lijin" <king.lijin@huawei.com>, ltp@lists.linux.it
>>>> Cc: "Li Jin" <King.lijin@huawei.com>
>>>> Sent: Friday, 27 November, 2015 7:44:09 AM
>>>> Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case
>>>> 	proc01.c
>>>>
>>>> fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
>>>> to replace /ipv6/conf/*/stable_secret to check the known issue string such
>>>> as
>>>> /proc/sys/net/ipv6/conf/all/stable_secret
>>>
>>> Hi,
>>>
>>> An explanation _why_ it is wrong would be helpful too.
>>
>> Got it. The reason is that a single "*" can not be used to match the any
>> string in fnmatch.
> 
> Why not? According to [1] referenced by [2]:
>   The <asterisk> ( '*' ) is a pattern that shall match any string, including the null string
> and it looks like valid 'shell wildcard pattern' (fnmatch(3)).
> 
> [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02
> [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html
> 

agreed.

>>>
>>>>
>>>> Signed-off-by: Li Jin <King.lijin@huawei.com>
>>>> ---
>>>>  testcases/kernel/fs/proc/proc01.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/testcases/kernel/fs/proc/proc01.c
>>>> b/testcases/kernel/fs/proc/proc01.c
>>>> index 2825b51..197eb55 100644
>>>> --- a/testcases/kernel/fs/proc/proc01.c
>>>> +++ b/testcases/kernel/fs/proc/proc01.c
>>>> @@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
>>>>  	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
>>>>  	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
>>>>  	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
>>>> -	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
>>>> +	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},
>>>
>>> This has problems as well:
>>
>> Just ignore it. It's the problem of my linux system
>>
>>>
>>> # ip tuntap add 1tap mode tap
>>> # ./proc01 -m 128
>>> proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
>>> proc01      1  TFAIL  :  proc01.c:393: read failed:
>>> /proc/sys/net/ipv6/conf/1tap/stable_secret: errno=EIO(5): Input/output
>>> error
>>> ...
>>>
>>> How about:
>>> +       {"read", "/proc/sys/net/ipv6/conf/?*/stable_secret", EIO},
>>
>> Good idea. It works and I will send V2 patch.
> 
> I'm curious on what distro and glibc version original code is failing for you.

redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.

Regards,

Jin

> 
> Regards,
> Jan
> 
>>
>> Regards,
>>
>> Jin
>>
>>>
>>> Regards,
>>> Jan
>>>
>>>>  	{"", "", 0}
>>>>  };
>>>>  
>>>> --
>>>> 1.8.3.1
>>>>
>>>>
>>>> --
>>>> Mailing list info: http://lists.linux.it/listinfo/ltp
>>>>
>>>
>>> .
>>>
>>
>>
>>
> 
> .
> 



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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01  9:34         ` Lijin
@ 2015-12-01 10:02           ` Jan Stancek
  2015-12-01 17:10           ` Jeffrey Bastian
  1 sibling, 0 replies; 11+ messages in thread
From: Jan Stancek @ 2015-12-01 10:02 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Lijin(Euler Dept 8)" <lijin14@huawei.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: "Li Jin" <King.lijin@huawei.com>, ltp@lists.linux.it
> Sent: Tuesday, 1 December, 2015 10:34:34 AM
> Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
> 
> On 2015/12/1 16:35, Jan Stancek wrote:
> > 
> > 
> > 
> > 
> > ----- Original Message -----
> >> From: "Lijin(Euler Dept 8)" <lijin14@huawei.com>
> >> To: "Jan Stancek" <jstancek@redhat.com>
> >> Cc: "Li Jin" <King.lijin@huawei.com>, ltp@lists.linux.it
> >> Sent: Tuesday, 1 December, 2015 2:30:27 AM
> >> Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case
> >> proc01.c
> >>
> >> On 2015/11/30 20:46, Jan Stancek wrote:
> >>>
> >>>
> >>>
> >>>
> >>> ----- Original Message -----
> >>>> From: "Li Jin" <King.lijin@huawei.com>
> >>>> To: "king lijin" <king.lijin@huawei.com>, ltp@lists.linux.it
> >>>> Cc: "Li Jin" <King.lijin@huawei.com>
> >>>> Sent: Friday, 27 November, 2015 7:44:09 AM
> >>>> Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case
> >>>> 	proc01.c
> >>>>
> >>>> fnmatch() in proc01.c should use pattern ipv6/conf/[a-z]*/stable_secret
> >>>> to replace /ipv6/conf/*/stable_secret to check the known issue string
> >>>> such
> >>>> as
> >>>> /proc/sys/net/ipv6/conf/all/stable_secret
> >>>
> >>> Hi,
> >>>
> >>> An explanation _why_ it is wrong would be helpful too.
> >>
> >> Got it. The reason is that a single "*" can not be used to match the any
> >> string in fnmatch.
> > 
> > Why not? According to [1] referenced by [2]:
> >   The <asterisk> ( '*' ) is a pattern that shall match any string,
> >   including the null string
> > and it looks like valid 'shell wildcard pattern' (fnmatch(3)).
> > 
> > [1]
> > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02
> > [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html
> > 
> 
> agreed.
> 
> >>>
> >>>>
> >>>> Signed-off-by: Li Jin <King.lijin@huawei.com>
> >>>> ---
> >>>>  testcases/kernel/fs/proc/proc01.c | 2 +-
> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/testcases/kernel/fs/proc/proc01.c
> >>>> b/testcases/kernel/fs/proc/proc01.c
> >>>> index 2825b51..197eb55 100644
> >>>> --- a/testcases/kernel/fs/proc/proc01.c
> >>>> +++ b/testcases/kernel/fs/proc/proc01.c
> >>>> @@ -107,7 +107,7 @@ static const struct mapping known_issues[] = {
> >>>>  	{"read", "/proc/fs/nfsd/.getfs", EINVAL},
> >>>>  	{"read", "/proc/fs/nfsd/.getfd", EINVAL},
> >>>>  	{"read", "/proc/self/net/rpc/use-gss-proxy", EAGAIN},
> >>>> -	{"read", "/proc/sys/net/ipv6/conf/*/stable_secret", EIO},
> >>>> +	{"read", "/proc/sys/net/ipv6/conf/[a-z]*/stable_secret", EIO},
> >>>
> >>> This has problems as well:
> >>
> >> Just ignore it. It's the problem of my linux system
> >>
> >>>
> >>> # ip tuntap add 1tap mode tap
> >>> # ./proc01 -m 128
> >>> proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is
> >>> write-only.
> >>> proc01      1  TFAIL  :  proc01.c:393: read failed:
> >>> /proc/sys/net/ipv6/conf/1tap/stable_secret: errno=EIO(5): Input/output
> >>> error
> >>> ...
> >>>
> >>> How about:
> >>> +       {"read", "/proc/sys/net/ipv6/conf/?*/stable_secret", EIO},
> >>
> >> Good idea. It works and I will send V2 patch.
> > 
> > I'm curious on what distro and glibc version original code is failing for
> > you.
> 
> redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable release
> version 2.17, by Roland McGrath et al.

Can give provide of these commands?

cat /etc/redhat-release
rpm -qa glibc
uname -r

Thanks,
Jan

> 
> Regards,
> 
> Jin
> 
> > 
> > Regards,
> > Jan
> > 
> >>
> >> Regards,
> >>
> >> Jin
> >>
> >>>
> >>> Regards,
> >>> Jan
> >>>
> >>>>  	{"", "", 0}
> >>>>  };
> >>>>  
> >>>> --
> >>>> 1.8.3.1
> >>>>
> >>>>
> >>>> --
> >>>> Mailing list info: http://lists.linux.it/listinfo/ltp
> >>>>
> >>>
> >>> .
> >>>
> >>
> >>
> >>
> > 
> > .
> > 
> 
> 
> 

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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01  9:34         ` Lijin
  2015-12-01 10:02           ` Jan Stancek
@ 2015-12-01 17:10           ` Jeffrey Bastian
  2015-12-02  6:05             ` Lijin
  2015-12-02  6:25             ` Jin Li
  1 sibling, 2 replies; 11+ messages in thread
From: Jeffrey Bastian @ 2015-12-01 17:10 UTC (permalink / raw)
  To: ltp

On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
> On 2015/12/1 16:35, Jan Stancek wrote:
> > I'm curious on what distro and glibc version original code is failing for you.
> 
> redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.

RHEL6 had glibc-2.12 and kernel-2.6.32, so you must have a locally built
version of glibc-2.17 and kernel-4.1?

What locale are you using?  There is an open bug about the * glob not
working on multibyte characters, and although there should not be any
multibyte characters in the /proc/sys/net/ipv6/conf/*/stable_secret
path, I wonder if this is somehow related?
  https://sourceware.org/bugzilla/show_bug.cgi?id=14185

It might be worth trying different values of $LANG and/or $LC_ALL to see
if that helps or not, especially LANG=C and LC_ALL=C.

-- 
Jeff Bastian

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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01 17:10           ` Jeffrey Bastian
@ 2015-12-02  6:05             ` Lijin
  2015-12-02  6:25             ` Jin Li
  1 sibling, 0 replies; 11+ messages in thread
From: Lijin @ 2015-12-02  6:05 UTC (permalink / raw)
  To: ltp

On 2015/12/2 1:10, Jeffrey Bastian wrote:
> On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
>> On 2015/12/1 16:35, Jan Stancek wrote:
>>> I'm curious on what distro and glibc version original code is failing for you.
>>
>> redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
> 
> RHEL6 had glibc-2.12 and kernel-2.6.32, so you must have a locally built
> version of glibc-2.17 and kernel-4.1?

Hi Jeffrey and Jan

Use this thread for future discuss.


Jan,

Sorry for wrong info in the last email. The right glibc and kernel version should be:

[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@localhost ~]#
[root@localhost ~]# rpm -qa glibc
glibc-2.17-68.sa1.4.aarch64
[root@localhost ~]# uname -r
4.1.12

> 
> What locale are you using?  There is an open bug about the * glob not
> working on multibyte characters, and although there should not be any
> multibyte characters in the /proc/sys/net/ipv6/conf/*/stable_secret
> path, I wonder if this is somehow related?
>   https://sourceware.org/bugzilla/show_bug.cgi?id=14185
> 
> It might be worth trying different values of $LANG and/or $LC_ALL to see
> if that helps or not, especially LANG=C and LC_ALL=C.

Jeffrey,

Thanks your info. My default locale is "en_US.UTF-8". Then I set the locale as follows but get the same error

[root@localhost ~]# export LC_ALL=C
[root@localhost ~]# export LANG=C
[root@localhost ~]# ./proc01
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      1  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/all/stable_secret: errno=EIO(5): Input/output error
proc01      2  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/bond0/stable_secret: errno=EIO(5): Input/output error


Regards,

Jin
> 



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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-01 17:10           ` Jeffrey Bastian
  2015-12-02  6:05             ` Lijin
@ 2015-12-02  6:25             ` Jin Li
  2015-12-02  9:47               ` Jan Stancek
  1 sibling, 1 reply; 11+ messages in thread
From: Jin Li @ 2015-12-02  6:25 UTC (permalink / raw)
  To: ltp

Resent this email because it is failed to sent the previous one to ltp@lists.linux.it


On 2015/12/2 1:10, Jeffrey Bastian wrote:
> On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
>> On 2015/12/1 16:35, Jan Stancek wrote:
>>> I'm curious on what distro and glibc version original code is failing for you.
>>
>> redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
> 
> RHEL6 had glibc-2.12 and kernel-2.6.32, so you must have a locally built
> version of glibc-2.17 and kernel-4.1?

Hi Jeffrey and Jan

Use this thread for future discuss.


Jan,

Sorry for wrong info in the last email. The right glibc and kernel version should be:

[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@localhost ~]#
[root@localhost ~]# rpm -qa glibc
glibc-2.17-68.sa1.4.aarch64
[root@localhost ~]# uname -r
4.1.12

> 
> What locale are you using?  There is an open bug about the * glob not
> working on multibyte characters, and although there should not be any
> multibyte characters in the /proc/sys/net/ipv6/conf/*/stable_secret
> path, I wonder if this is somehow related?
>   https://sourceware.org/bugzilla/show_bug.cgi?id=14185
> 
> It might be worth trying different values of $LANG and/or $LC_ALL to see
> if that helps or not, especially LANG=C and LC_ALL=C.

Jeffrey,

Thanks your info. My default locale is "en_US.UTF-8". Then I set the locale as follows but get the same error

[root@localhost ~]# export LC_ALL=C
[root@localhost ~]# export LANG=C
[root@localhost ~]# ./proc01
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      1  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/all/stable_secret: errno=EIO(5): Input/output error
proc01      2  TFAIL  :  proc01.c:392: read failed: /proc/sys/net/ipv6/conf/bond0/stable_secret: errno=EIO(5): Input/output error


Regards,

Jin
> 



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

* [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
  2015-12-02  6:25             ` Jin Li
@ 2015-12-02  9:47               ` Jan Stancek
  0 siblings, 0 replies; 11+ messages in thread
From: Jan Stancek @ 2015-12-02  9:47 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Jin Li" <lijin14@huawei.com>
> To: ltp@lists.linux.it, "Jeffrey Bastian" <jbastian@redhat.com>, "Jan Stancek" <jstancek@redhat.com>
> Sent: Wednesday, 2 December, 2015 7:25:15 AM
> Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
> 
> Resent this email because it is failed to sent the previous one to
> ltp@lists.linux.it
> 
> 
> On 2015/12/2 1:10, Jeffrey Bastian wrote:
> > On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
> >> On 2015/12/1 16:35, Jan Stancek wrote:
> >>> I'm curious on what distro and glibc version original code is failing for
> >>> you.
> >>
> >> redhat RHEL 6 and /lib64/libc.so.6 - GNU C Library (GNU libc) stable
> >> release version 2.17, by Roland McGrath et al.
> > 
> > RHEL6 had glibc-2.12 and kernel-2.6.32, so you must have a locally built
> > version of glibc-2.17 and kernel-4.1?
> 
> Hi Jeffrey and Jan
> 
> Use this thread for future discuss.
> 
> 
> Jan,
> 
> Sorry for wrong info in the last email. The right glibc and kernel version
> should be:
> 
> [root@localhost ~]# cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 7.0 (Maipo)
> [root@localhost ~]#
> [root@localhost ~]# rpm -qa glibc
> glibc-2.17-68.sa1.4.aarch64
> [root@localhost ~]# uname -r
> 4.1.12
> 
> > 
> > What locale are you using?  There is an open bug about the * glob not
> > working on multibyte characters, and although there should not be any
> > multibyte characters in the /proc/sys/net/ipv6/conf/*/stable_secret
> > path, I wonder if this is somehow related?
> >   https://sourceware.org/bugzilla/show_bug.cgi?id=14185
> > 
> > It might be worth trying different values of $LANG and/or $LC_ALL to see
> > if that helps or not, especially LANG=C and LC_ALL=C.
> 
> Jeffrey,
> 
> Thanks your info. My default locale is "en_US.UTF-8". Then I set the locale
> as follows but get the same error
> 
> [root@localhost ~]# export LC_ALL=C
> [root@localhost ~]# export LANG=C
> [root@localhost ~]# ./proc01
> proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
> proc01      1  TFAIL  :  proc01.c:392: read failed:
> /proc/sys/net/ipv6/conf/all/stable_secret: errno=EIO(5): Input/output error
> proc01      2  TFAIL  :  proc01.c:392: read failed:
> /proc/sys/net/ipv6/conf/bond0/stable_secret: errno=EIO(5): Input/output
> error

Line number of error message seems to be different than what I get
when I comment out "stable_secret" in proc01.c. I would expect you
hit error on line 393, but data from you show 392.

What is the LTP version you are running?
Has the file been locally modified? If so, please attach modified version.


I tried same glibc version as you have, but it works just fine here:

# rpm -qa glibc
glibc-2.17-68.sa1.4.aarch64

# uname -r
4.2.0-0.19.el7.aarch64

# md5sum proc01.c 
aa15cb1746980ac458b8f1f33213169f  proc01.c

# ./proc01 -m 128
proc01      0  TINFO  :  /proc/fs/nfsd/pool_stats: known issue: errno=ENODEV(19): No such device
proc01      0  TINFO  :  /proc/fs/nfsd/unlock_filesystem: known issue: errno=EINVAL(22): Invalid argument
proc01      0  TINFO  :  /proc/fs/nfsd/unlock_ip: known issue: errno=EINVAL(22): Invalid argument
proc01      0  TINFO  :  /proc/fs/nfsd/filehandle: known issue: errno=EINVAL(22): Invalid argument
proc01      0  TINFO  :  /proc/sys/fs/binfmt_misc/register: is write-only.
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/all/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/default/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/eth0/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/eth1/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/eth2/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/eth3/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/sys/net/ipv6/conf/lo/stable_secret: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/kmsg: known issue: errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
proc01      0  TINFO  :  /proc/sysrq-trigger: is write-only.
proc01      0  TINFO  :  /proc/self/task/17566/mem: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/self/task/17566/clear_refs: is write-only.
proc01      0  TINFO  :  /proc/self/task/17566/pagemap: reached maxmbytes (-m)
proc01      0  TINFO  :  /proc/self/mem: known issue: errno=EIO(5): Input/output error
proc01      0  TINFO  :  /proc/self/clear_refs: is write-only.
proc01      0  TINFO  :  /proc/self/pagemap: reached maxmbytes (-m)
proc01      1  TPASS  :  readproc() completed successfully, total read: 341460837 bytes, 1752 objs

Regards,
Jan

> 
> 
> Regards,
> 
> Jin
> > 
> 
> 
> 

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

end of thread, other threads:[~2015-12-02  9:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27  6:44 [LTP] Fix wrong pattern used by fnmatch in test case proc01.c Li Jin
2015-11-27  6:44 ` [LTP] [PATCH] " Li Jin
2015-11-30 12:46   ` Jan Stancek
2015-12-01  1:30     ` Lijin
2015-12-01  8:35       ` Jan Stancek
2015-12-01  9:34         ` Lijin
2015-12-01 10:02           ` Jan Stancek
2015-12-01 17:10           ` Jeffrey Bastian
2015-12-02  6:05             ` Lijin
2015-12-02  6:25             ` Jin Li
2015-12-02  9:47               ` Jan Stancek

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