summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIurii Zaikin <yzaikin@google.com>2019-09-23 02:02:47 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:17:10 +0200
commit03c4d42e3c14cca45ce64c85cd1eee0227048b85 (patch)
tree4c64f13dadbc59c8f8f2dd21a8216adf82865df6 /lib
parent5d087e3578cf9cbd850a6f0a5c8b8169f22b5272 (diff)
kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()
[ Upstream commit 2cb80dbbbaba4f2f86f686c34cb79ea5cbfb0edb ] KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin <yzaikin@google.com> Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6118d99117da..ee00c6c8a373 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1939,6 +1939,17 @@ config TEST_SYSCTL
If unsure, say N.
+config SYSCTL_KUNIT_TEST
+ bool "KUnit test for sysctl"
+ depends on KUNIT
+ help
+ This builds the proc sysctl unit test, which runs on boot.
+ Tests the API contract and implementation correctness of sysctl.
+ For more information on KUnit and unit tests in general please refer
+ to the KUnit documentation in Documentation/dev-tools/kunit/.
+
+ If unsure, say N.
+
config TEST_UDELAY
tristate "udelay test driver"
help