sysctl: Add a selftest for handling empty dirs
authorJoel Granados <j.granados@samsung.com>
Tue, 21 Nov 2023 11:02:19 +0000 (12:02 +0100)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 28 Dec 2023 12:57:57 +0000 (04:57 -0800)
commit777740779ec5bd05eac85d9bbbb6b11457cfd238
tree0eeebc433aef66f6f44e25966ce965ae278f7b9f
parent315552310c7de92baea4e570967066569937a843
sysctl: Add a selftest for handling empty dirs

Basic test to ensure that empty directories can be registered and that
they in turn can serve as a base dir for other registrations.

Add one test to the sysctl selftest module. It first registers an empty
directory under "empty_add" and then uses that as a base to register
another empty dir.
The sysctl bash script then checks that "empty_add" is present and that
there an empty directory within it.

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