test_sysclt: Test for registering a mount point
authorJoel Granados <j.granados@samsung.com>
Fri, 16 Jun 2023 08:59:20 +0000 (10:59 +0200)
committerLuis Chamberlain <mcgrof@kernel.org>
Sun, 18 Jun 2023 09:32:54 +0000 (02:32 -0700)
commitf2e7a6265e5a5e02ee663eda3d0527dd8230b832
tree8fb79442d2b4508eebc5d39980ae5d1d36b2d0a7
parentec866cc6f8a90a65cd085377405c34f0f6d9ba60
test_sysclt: Test for registering a mount point

Test that target gets created by register_sysctl_mount_point and that no
additional target can be created "on top" of a permanently empty sysctl
table.

Create a mount point target (mnt) in the sysctl test driver; try to
create another on top of that (mnt_error). Output an error if
"mnt_error" is present when we run the sysctl selftests.

Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
lib/test_sysctl.c
tools/testing/selftests/sysctl/sysctl.sh