Skip to contentSkip to conversation

Fix wrong pattern used by fnmatch in test case proc01.c

LTP Superseded Li Jin 4 participants 11 messages Nov 27, 2015 – Dec 2, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Li Jin

author
#0 lore raw

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
author
#1 lore raw

PATCH 1/1 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

---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/fs/proc/proc01.c +1 -1
index 2825b51..197eb55 100644
@@ -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}
 };
 
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

----- Original Message -----

Quoted 9 lines

From: "Li Jin" <[email protected]>
To: "king lijin" <[email protected]>, [email protected]
Cc: "Li Jin" <[email protected]>
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.

Quoted 12 lines
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/fs/proc/proc01.c +0 -0
index 2825b51..197eb55 100644

testcases/kernel/fs/proc/proc01.c static const struct mapping known_issues[] = { · line 110

Quoted 5 lines
testcases/kernel/fs/proc/proc01.c +1 -1
@@ -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

Quoted 10 lines
testcases/kernel/fs/proc/proc01.c +0 -1
 	{"", "", 0}
 };
 
--

1.8.3.1

--
Mailing list info: http://lists.linux.it/listinfo/ltp

#3 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 11 lines · Jan Stancek

----- Original Message -----

Quoted 6 lines

From: "Li Jin" <[email protected]>
To: "king lijin" <[email protected]>, [email protected]
Cc: "Li Jin" <[email protected]>
Sent: Friday, 27 November, 2015 7:44:09 AM
Subject: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 7 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 7 lines
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

testcases/kernel/fs/proc/proc01.c static const struct mapping known_issues[] = { · line 110

Quoted 11 lines
testcases/kernel/fs/proc/proc01.c +1 -1
index 2825b51..197eb55 100644
@@ -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

Quoted 9 lines
# 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

Quoted 17 lines

Regards,
Jan

Quoted 10 lines
testcases/kernel/fs/proc/proc01.c +0 -1
 	{"", "", 0}
 };
 
--

1.8.3.1

--
Mailing list info: http://lists.linux.it/listinfo/ltp

.

#4 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

----- Original Message -----

Quoted 24 lines

From: "Lijin(Euler Dept 8)" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Li Jin" <[email protected]>, [email protected]
Sent: Tuesday, 1 December, 2015 2:30:27 AM
Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 17 lines · Jan Stancek

----- Original Message -----

Quoted 11 lines

From: "Li Jin" <[email protected]>
To: "king lijin" <[email protected]>, [email protected]
Cc: "Li Jin" <[email protected]>
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

Quoted 6 lines
Quoted 3 lines

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

Quoted 32 lines
Quoted 7 lines
Quoted 7 lines
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

testcases/kernel/fs/proc/proc01.c static const struct mapping known_issues[] = { · line 110

Quoted 11 lines
testcases/kernel/fs/proc/proc01.c +1 -1
index 2825b51..197eb55 100644
@@ -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

Quoted 9 lines
# 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
...
Quoted 4 lines
Quoted 2 lines

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

Quoted 25 lines

Regards,

Jin

Quoted 17 lines

Regards,
Jan

Quoted 10 lines
testcases/kernel/fs/proc/proc01.c +0 -1
 	{"", "", 0}
 };
 
--

1.8.3.1

--
Mailing list info: http://lists.linux.it/listinfo/ltp

.

#5 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 36 lines · Jan Stancek

----- Original Message -----

Quoted 24 lines

From: "Lijin(Euler Dept 8)" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Li Jin" <[email protected]>, [email protected]
Sent: Tuesday, 1 December, 2015 2:30:27 AM
Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 17 lines · Jan Stancek

----- Original Message -----

Quoted 11 lines

From: "Li Jin" <[email protected]>
To: "king lijin" <[email protected]>, [email protected]
Cc: "Li Jin" <[email protected]>
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

Quoted 6 lines
Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 32 lines
Quoted 32 lines
Quoted 7 lines
Quoted 7 lines
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

testcases/kernel/fs/proc/proc01.c static const struct mapping known_issues[] = { · line 110

Quoted 11 lines
testcases/kernel/fs/proc/proc01.c +1 -1
index 2825b51..197eb55 100644
@@ -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

Quoted 9 lines
# 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
...
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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

Quoted 32 lines

Regards,
Jan

Quoted 25 lines

Regards,

Jin

Quoted 17 lines

Regards,
Jan

Quoted 10 lines
testcases/kernel/fs/proc/proc01.c +0 -1
 	{"", "", 0}
 };
 
--

1.8.3.1

--
Mailing list info: http://lists.linux.it/listinfo/ltp

.

.

#6 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

----- Original Message -----

Quoted 93 lines

From: "Lijin(Euler Dept 8)" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Li Jin" <[email protected]>, [email protected]
Sent: Tuesday, 1 December, 2015 10:34:34 AM
Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 38 lines · Jan Stancek

----- Original Message -----

Quoted 26 lines

From: "Lijin(Euler Dept 8)" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Li Jin" <[email protected]>, [email protected]
Sent: Tuesday, 1 December, 2015 2:30:27 AM
Subject: Re: [LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 18 lines · Jan Stancek

----- Original Message -----

Quoted 12 lines

From: "Li Jin" <[email protected]>
To: "king lijin" <[email protected]>, [email protected]
Cc: "Li Jin" <[email protected]>
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

Quoted 6 lines
Quoted 3 lines

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.

Quoted 9 lines

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.

Quoted 36 lines
Quoted 36 lines
Quoted 7 lines
Quoted 7 lines
---
 testcases/kernel/fs/proc/proc01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

testcases/kernel/fs/proc/proc01.c static const struct mapping known_issues[] = { · line 110

Quoted 11 lines
testcases/kernel/fs/proc/proc01.c +1 -1
index 2825b51..197eb55 100644
@@ -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

Quoted 12 lines
# 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},

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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

Quoted 40 lines

Regards,

Jin

Quoted 32 lines

Regards,
Jan

Quoted 25 lines

Regards,

Jin

Quoted 17 lines

Regards,
Jan

Quoted 10 lines
testcases/kernel/fs/proc/proc01.c +0 -1
 	{"", "", 0}
 };
 
--

1.8.3.1

--
Mailing list info: http://lists.linux.it/listinfo/ltp

.

.

#7 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

In reply to Lijin (Euler Dept 8)
Quoted 4 lines · On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
Quoted 1 line · Jan Stancek

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.

Signature · 1 line
Jeff Bastian
#8 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

Quoted 8 lines · Jeffrey Bastian
Quoted 4 lines · On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
Quoted 1 line · Jan Stancek

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

Quoted 9 lines

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

Quoted 1 line
#9 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

In reply to Jeffrey Bastian

Resent this email because it is failed to sent the previous one to [email protected]

Quoted 8 lines · Jeffrey Bastian
Quoted 4 lines · On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
Quoted 1 line · Jan Stancek

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

Quoted 9 lines

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

Quoted 1 line
#10 lore raw

PATCH 1/1 Fix wrong pattern used by fnmatch in test case proc01.c

----- Original Message -----

Quoted 57 lines

From: "Jin Li" <[email protected]>
To: [email protected], "Jeffrey Bastian" <[email protected]>, "Jan Stancek" <[email protected]>
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 [email protected]

Quoted 10 lines · Jeffrey Bastian
Quoted 6 lines · On Tue, Dec 01, 2015 at 05:34:34PM +0800, Lijin(Euler Dept 8) wrote:
Quoted 2 lines · Jan Stancek

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

Quoted 9 lines

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

Quoted 6 lines
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

Quoted 9 lines

Regards,

Jin

Quoted 1 line