[Ocfs2-test-devel] [PATCH 32/59] xattr-test: fix single test failed
Eric Ren
zren at suse.com
Tue Sep 22 03:58:49 PDT 2015
Hi Junxiao,
This patch should be dropped. It's because commit 48fd0cbd from Goldwyn
has covered this issue. And conflict with commit 17025e03e3d81c05cc0e9816c15635773a75c5d
has been fixed.
Thanks,
Eric Ren
On Mon, Sep 14, 2015 at 10:44:18AM +0800, Junxiao Bi wrote:
> The xattr size is packaged into xattr value to do validation. It must
> take up 5 bytes. This bug is involved by commit
> 17025e03e3d81c05cc0e9816c15635773a75c5d
>
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> ---
> programs/xattr_tests/xattr-test-utils.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/programs/xattr_tests/xattr-test-utils.c b/programs/xattr_tests/xattr-test-utils.c
> index 5a16ad6..c2c9d03 100644
> --- a/programs/xattr_tests/xattr-test-utils.c
> +++ b/programs/xattr_tests/xattr-test-utils.c
> @@ -107,7 +107,7 @@ void xattr_name_generator(unsigned long xattr_no,
> }
>
> xattr_name[xattr_name_rsz - 6] = 0;
> - snprintf(postfix, 7, "%lu", xattr_no);
> + snprintf(postfix, 7, "%06d", xattr_no);
> strcat(xattr_name, postfix);
> strcpy(xattr_name_list_set[xattr_no], xattr_name);
> }
> @@ -365,7 +365,7 @@ void xattr_value_constructor(int xattr_entry_no)
> strlen(value_postfix_magic) -
> strlen(xattr_name) - 5);
>
> - snprintf(value_sz, 6, "%zu", strlen(value_prefix_magic) +
> + snprintf(value_sz, 6, "%05d", strlen(value_prefix_magic) +
> strlen(xattr_name) + strlen(xattr_value) + 5 +
> strlen(value_postfix_magic));
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
>
More information about the Ocfs2-test-devel
mailing list