[LTP] [PATCH] kcmp: Convert docs to docparse

Xinjian Ma (Fujitsu) maxj.fnst@fujitsu.com
Tue Aug 27 08:13:13 CEST 2024


Hi Petr

> Hi Ma,
> 
> > +++ b/testcases/kernel/syscalls/kcmp/kcmp02.c
> ...
> > - /* Description:
> > - *   Verify that:
> > - *		1) kcmp fails with bad pid
> > - *		2) kcmp fails with invalid flag
> > - *		3) kcmp fails with invalid flag
> > - *		4) kcmp fails with invalid flag
> > - *		5) kcmp fails with invalid flag
> > - *		6) kcmp fails with invalid fd
> > +/*\
> > + * [Description]
> > + *
> > + * Verify that, kcmp() returns -1 and sets errno to
> > + *
> > + * 1. ESRCH if pid does not exist
> > + * 2. EINVAL if type is invalid
> > + * 3. EINVAL if type is invalid
> > + * 4. EINVAL if type is invalid
> > + * 5. EINVAL if type is invalid
> 4x EINVAL, it would be better to describe how they differs.
> Obviously KCMP_TYPES (the last item in enum kcmp_type in
> include/uapi/linux/kcmp.h) should not be used in userspace (it's not in man page).
> Other wrong values are -1 (negative), INT_MIN (negative) and INT_MAX too
> high.

Thanks for the review, I have sent the PATCH v2, PTAL.

Best regards,
Ma
> 
> Or, if you don't want to bother with the description, you could wrote:
> 
> * 1. ESRCH if pid does not exist
> * 2-5. EINVAL if type is invalid
> * 5. EINVAL if type is invalid
> * 6. EBADF if fd is invalid
> 
> Kind regards,
> Petr
> 
> > + * 6. EBADF if fd is invalid
> ...


More information about the ltp mailing list