From: Cyril Hrubis <chrubis-AlSwsSmVLrQ@public.gmane.org>
To: Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: ltp-cunTk1MwBs91InPhgRC9rw@public.gmane.org,
libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request
Date: Tue, 26 Jul 2016 18:03:30 +0200 [thread overview]
Message-ID: <20160726160329.GD5868@rei> (raw)
In-Reply-To: <20160722042656.22346-7-raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi!
> __ptrace_request is only available with glibc
>
> Signed-off-by: Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> testcases/kernel/syscalls/ptrace/ptrace03.c | 2 +-
> testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
> index a4028fc..f326b83 100644
> --- a/testcases/kernel/syscalls/ptrace/ptrace03.c
> +++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
> @@ -102,7 +102,7 @@ static pid_t unused_pid;
> static pid_t zero_pid;
>
> struct test_case_t {
> - enum __ptrace_request request;
> + int request;
> pid_t *pid;
> int exp_errno;
> } test_cases[] = {
> diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> index ae538e9..83de9b4 100644
> --- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> +++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> @@ -130,7 +130,7 @@ static char *strings[] = {
> SPT(KILL)
> SPT(SINGLESTEP)
> };
> -static inline char *strptrace(enum __ptrace_request request)
> +static inline char *strptrace(int request)
> {
> return strings[request];
> }
The enum __ptrace_request is used to describe the function prototype in
the ptrace() manual page so one can argue that it's part of the official
API.
If I remeber right, it's missing in musl libc and the code in question
fails to compile.
CCing glibc ML and also man-pages ML to see if the type is used in
manual page intentionally or not.
--
Cyril Hrubis
chrubis-AlSwsSmVLrQ@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
parent reply other threads:[~2016-07-26 16:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20160722042656.22346-7-raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
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=20160726160329.GD5868@rei \
--to=chrubis-alswssmvlrq@public.gmane.org \
--cc=libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ltp-cunTk1MwBs91InPhgRC9rw@public.gmane.org \
--cc=raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).