diff mbox series

llistxattr03: Convert docs to docparse

Message ID 20241031085934.57039-1-maxj.fnst@fujitsu.com
State Accepted
Headers show
Series llistxattr03: Convert docs to docparse | expand

Commit Message

Ma Xinjian Oct. 31, 2024, 8:59 a.m. UTC
Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
---
 .../kernel/syscalls/llistxattr/llistxattr03.c | 23 +++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)

Comments

Wei Gao Nov. 5, 2024, 11:18 a.m. UTC | #1
On Thu, Oct 31, 2024 at 04:59:34PM +0800, Ma Xinjian via ltp wrote:
> Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
> ---
>  .../kernel/syscalls/llistxattr/llistxattr03.c | 23 +++++++++----------
>  1 file changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
> index 940851f40..3280e91aa 100644
> --- a/testcases/kernel/syscalls/llistxattr/llistxattr03.c
> +++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
> @@ -1,17 +1,16 @@
>  // SPDX-License-Identifier: GPL-2.0-or-later
>  /*
> -* Copyright (c) 2016 Fujitsu Ltd.
> -* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
> -*/
> -
> -/*
> -* Test Name: llistxattr03
> -*
> -* Description:
> -* llistxattr is identical to listxattr. an empty buffer of size zero
> -* can return the current size of the list of extended attribute names,
> -* which can be used to estimate a suitable buffer.
> -*/
> + * Copyright (c) 2016 Fujitsu Ltd.
> + * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
> + */
> +
> +/*\
> + * [Description]
> + *
> + * llistxattr is identical to listxattr. An empty buffer of size zero
> + * can return the current size of the list of extended attribute names,
> + * which can be used to estimate a suitable buffer.
> + */
Reviewed-by: Wei Gao <wegao@suse.com>
>  
>  #include "config.h"
>  #include <errno.h>
> -- 
> 2.42.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel Nov. 12, 2024, 10:49 p.m. UTC | #2
Hi all,

...
> > -* Description:
> > -* llistxattr is identical to listxattr. an empty buffer of size zero
> > -* can return the current size of the list of extended attribute names,
> > -* which can be used to estimate a suitable buffer.
> > -*/
> > + * Copyright (c) 2016 Fujitsu Ltd.
> > + * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
> > + */
> > +
> > +/*\
> > + * [Description]
> > + *
> > + * llistxattr is identical to listxattr. An empty buffer of size zero
> > + * can return the current size of the list of extended attribute names,
> > + * which can be used to estimate a suitable buffer.
> > + */

IMHO the best description was in v1 of the test:

https://lore.kernel.org/ltp/1454058489-25625-3-git-send-email-yangx.jy@cn.fujitsu.com/

llistxattr(2) with an empty buffer of size zero can return
the current size of the list of extended attribute names.

What was then in v3 committed is slightly misleading.

"llistxattr is identical to listxattr" is from man page, but it's IMHO
irrelevant. Also first "can" is wrong (it should always work, not just
sometimes).

I dared to rewrite before merge:

 * Verify that llistxattr(2) call with zero size returns the current size of the
 * list of extended attribute names, which can be used to determine the size of
 * the buffer that should be supplied in a subsequent llistxattr(2) call.

Thanks!

Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
index 940851f40..3280e91aa 100644
--- a/testcases/kernel/syscalls/llistxattr/llistxattr03.c
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c
@@ -1,17 +1,16 @@ 
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
-* Copyright (c) 2016 Fujitsu Ltd.
-* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
-*/
-
-/*
-* Test Name: llistxattr03
-*
-* Description:
-* llistxattr is identical to listxattr. an empty buffer of size zero
-* can return the current size of the list of extended attribute names,
-* which can be used to estimate a suitable buffer.
-*/
+ * Copyright (c) 2016 Fujitsu Ltd.
+ * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
+ */
+
+/*\
+ * [Description]
+ *
+ * llistxattr is identical to listxattr. An empty buffer of size zero
+ * can return the current size of the list of extended attribute names,
+ * which can be used to estimate a suitable buffer.
+ */
 
 #include "config.h"
 #include <errno.h>