docs: add a script to check sysctl docs
Subsystems (2)
PATCH v3 1/1 docs: add a script to check sysctl docs
This script allows sysctl documentation to be checked against the kernel source code, to identify missing or obsolete entries. Running it against 5.5 shows for example that sysctl/kernel.rst has two obsolete entries and is missing 52 entries.
---
Changes since v2:
* drop UTF-8 characters
* fix license identifier
* fix example invocation to include path as well as table
v2 was the initial submission (in v2 of the sysctl/kernel.rst patch set).
--- Documentation/admin-guide/sysctl/kernel.rst | 3 + scripts/check-sysctl-docs | 181 ++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100755 scripts/check-sysctl-docs
Documentation/admin-guide/sysctl/kernel.rst +3 -0
@@ -2,6 +2,9 @@ Documentation for /proc/sys/kernel/ =================================== +.. See scripts/check-sysctl-docs to keep this up to date + + Copyright (c) 1998, 1999, Rik van Riel <[email protected]> Copyright (c) 2009, Shen Feng<[email protected]>
scripts/check-sysctl-docs new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
2.20.1
Jonathan Corbet
maintainerQuoted 6 lines · On Wed, 19 Feb 2020 16:34:42 +0100 Stephen Kitt <[email protected]> wrote:
This script allows sysctl documentation to be checked against the kernel source code, to identify missing or obsolete entries. Running it against 5.5 shows for example that
sysctl/kernel.rsthas two obsolete entries and is missing 52 entries.Signed-off-by Stephen Kitt <[email protected]>
Quoted 8 lines
---
Changes since v2:
* drop UTF-8 characters
* fix license identifier
* fix example invocation to include path as well as tablev2 was the initial submission (in v2 of the
sysctl/kernel.rstpatch set).
This seems like a useful thing to have, so I've applied it. It would be rather more useful, though, with a bit of ... wait for it ... documentation. Even just an example command line in the header comments would be a good place to start. Care to send a followup? :)
Thanks,
jon
Quoted 15 lines · Jonathan Corbet
Quoted 12 lines · On Wed, 19 Feb 2020 16:34:42 +0100 Stephen Kitt <[email protected]> wrote:
This script allows sysctl documentation to be checked against the kernel source code, to identify missing or obsolete entries. Running it against 5.5 shows for example that
sysctl/kernel.rsthas two obsolete entries and is missing 52 entries.Signed-off-by Stephen Kitt <[email protected]>---
Changes since v2:
* drop UTF-8 characters
* fix license identifier
* fix example invocation to include path as well as table
Quoted 7 lines
Quoted 2 lines
v2 was the initial submission (in v2 of the
sysctl/kernel.rstpatch set).This seems like a useful thing to have, so I've applied it. It would be rather more useful, though, with a bit of ... wait for it ... documentation. Even just an example command line in the header comments would be a good place to start. Care to send a followup? :)
The committed script has this:
+# Example invocation:
+# scripts/check-sysctl-docs -vtable="kernel" \
+# Documentation/admin-guide/sysctl/kernel.rst \
+# $(git grep -l register_sysctl_)
+#
+# Specify -vdebug=1 to see debugging information
but I agree that it needs more documentation ;-). In particular, I need to explain what the script expects in terms of document layout...
Where would be the best place? In admin-guide/sysctl/index.rst, as a “how to maintain these files” section, or in a separate document, or in the script headers?
Regards,
Stephen