From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: Daniel Wagner <dwagner@suse.de>,
"Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH 1/2] libtraceevent: Add check for duplicate functions in man pages
Date: Wed, 4 Jan 2023 12:26:54 -0500 [thread overview]
Message-ID: <20230104172655.145516-2-rostedt@goodmis.org> (raw)
In-Reply-To: <20230104172655.145516-1-rostedt@goodmis.org>
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Update the check-manpages.sh script to make sure that there are no
functions that are described in more than one man page.
The output will look like this:
Found tep_find_function in libtraceevent-func_find.txt and in libtraceevent-func_apis.txt
Found tep_find_function_address in libtraceevent-func_find.txt and in libtraceevent-func_apis.txt
Link: https://lore.kernel.org/linux-trace-devel/20221224153225.ojre2c3fxktfxtj2@carbon.lan/
Reported-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
check-manpages.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/check-manpages.sh b/check-manpages.sh
index 85b3b7406864..4e9850f18c3d 100755
--- a/check-manpages.sh
+++ b/check-manpages.sh
@@ -15,12 +15,19 @@ cd $1
MAIN=libtraceevent
MAIN_FILE=${MAIN}.txt
+PROCESSED=""
+
# Ignore man pages that do not contain functions
IGNORE=""
for man in ${MAIN}-*.txt; do
- sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man | while read a; do
+ for a in `sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man`; do
+ if [ "${PROCESSED/:${a} /}" != "${PROCESSED}" ]; then
+ P="${PROCESSED/:${a} */}"
+ echo "Found ${a} in ${man} and in ${P/* /}"
+ fi
+ PROCESSED="${man}:${a} ${PROCESSED}"
if [ "${IGNORE/$man/}" != "${IGNORE}" ]; then
continue
fi
--
2.35.1
next prev parent reply other threads:[~2023-01-04 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 17:26 [PATCH 0/2] libtraceevent: Remove duplicate man page functions Steven Rostedt
2023-01-04 17:26 ` Steven Rostedt [this message]
2023-01-04 17:26 ` [PATCH 2/2] libtraceevent: Remove tep_find_function{_address}() from libtraceevent-func_apis.txt Steven Rostedt
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=20230104172655.145516-2-rostedt@goodmis.org \
--to=rostedt@goodmis.org \
--cc=dwagner@suse.de \
--cc=linux-trace-devel@vger.kernel.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).