From: Petr Vorel <pvorel@suse.cz>
To: Ma Xinjian <maxj.fnst@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] kcmp: Convert docs to docparse
Date: Fri, 23 Aug 2024 14:02:08 +0200 [thread overview]
Message-ID: <20240823120208.GC1247674@pevik> (raw)
In-Reply-To: <20240821080808.3311245-1-maxj.fnst@fujitsu.com>
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.
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
...
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-08-23 12:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 8:08 [LTP] [PATCH] kcmp: Convert docs to docparse Ma Xinjian via ltp
2024-08-23 12:02 ` Petr Vorel [this message]
2024-08-27 6:13 ` Xinjian Ma (Fujitsu) via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240823120208.GC1247674@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=maxj.fnst@fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox