[LTP] [PATCH] Fix wrong pattern used by fnmatch in test case proc01.c
Jan Stancek
jstancek@redhat.com
Mon Nov 30 13:46:12 CET 2015
----- 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
>
More information about the Ltp
mailing list